Fix chown in dev_setup when GROUP != USER
This finds the default group of the user and uses that as group when doing chown in dev_setup.sh the same way as it's done in the prepare-msm.sh script
@@ -222,8 +222,10 @@ fi" > ~/.profile_mycroft
if [[ ! -d /opt/mycroft/skills ]] ; then
echo "This script will create that folder for you. This requires sudo"
echo "permission and might ask you for a password..."
+ setup_user=$USER
+ setup_group=$( id -gn $USER )
$SUDO mkdir -p /opt/mycroft/skills
- $SUDO chown -R $USER:$USER /opt/mycroft
+ $SUDO chown -R ${setup_user}:${setup_group} /opt/mycroft
echo "Created!"
fi
if [[ ! -d skills ]] ; then
