Fix chown to use primary group of user for group name
Sometimes there is a 'users' group, not a group per user. This makes it use primary group of user, not the explicit user name for group name.
Thanks.
Yeah, it was always designed around there being a group with the same name (as RetroPie originated on an OS where this was the default). The changes look good, but I will need to give it a test etc.
After a discussion with some other developers, we would prefer this to be implemented with a variable $group. eg doing group=$(id -ng) in retropie_packages.sh and then doing chown $user:$group. Primarily because it's a clearer more well known syntax than leaving the group name out of the chown.
I'm happy if you want to change this PR to implement it like that, or if you prefer I can make the changes. Thanks again.
@joolswills I made a pull request following that guideline.
Going to do this with some variable name changes in addition. Sorry for delays but will look at this soon.