Set default gcc version at startup 

like retropie 1.x
Merge pull request #350 from gizmo98/patch-2

Set default gcc version at startup
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
fixed - typo - missing space in advmame configure script.oops
delete root .advance / $user/.advance folders before generating default config and moving. no need to chmod, just chown to pi user
Merge pull request #366 from joolswills/fixes

fixed - typo - missing space in advmame configure script.oops