grep needs the hyphen quoted or it will throw an error thinking it is a parameter
google code does not like shallow git checkouts (fatal: expected shallow/unshallow, gotError: internal server error). Add NS option (no shallow) for google hosted repositories
there is no platform=rpi in the makefile for cavestory, and with that parameter it builds a dll rather than a .so in my chroot environment
chmod +777 is not valid. we don't want world writable files anyway, so chown to the correct user/group
error reporting was broken - first of all if using retropie_packages.sh manually from the commandline no errors set in $__ERRMSGS were ever displayed.
The second problem was any variables set by the retropie_packages.sh script was lost when run via "source" due to the pipe forcing it to be run in a sub-process.
if we switch to use process substitution this seems to fix it.
Merge pull request #363 from joolswills/fixes

Fixes