Skip to content

Commit

Permalink
Fix chown in dev_setup when GROUP != USER (#2094)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
forslund authored and Ruthvicp committed Apr 17, 2019
1 parent 2b8bf1d commit f4da3e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dev_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f4da3e7

Please sign in to comment.