dev_setup.sh: Use SUDO variable for all sudo commands

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
pull/1969/head
Alistair Francis 2019-01-22 10:30:34 -08:00
parent 9ef95506d0
commit 67fdc4ea10
1 changed files with 4 additions and 4 deletions

View File

@ -194,8 +194,8 @@ fi" > ~/.profile_mycroft
if [[ ! -d /opt/mycroft/skills ]] ; then if [[ ! -d /opt/mycroft/skills ]] ; then
echo "This script will create that folder for you. This requires sudo" echo "This script will create that folder for you. This requires sudo"
echo "permission and might ask you for a password..." echo "permission and might ask you for a password..."
sudo mkdir -p /opt/mycroft/skills $SUDO mkdir -p /opt/mycroft/skills
sudo chown -R $USER:$USER /opt/mycroft $SUDO chown -R $USER:$USER /opt/mycroft
echo "Created!" echo "Created!"
fi fi
if [[ ! -d skills ]] ; then if [[ ! -d skills ]] ; then
@ -416,9 +416,9 @@ if [[ ! -w /var/log/mycroft/ ]] ; then
# Creating and setting permissions # Creating and setting permissions
echo "Creating /var/log/mycroft/ directory" echo "Creating /var/log/mycroft/ directory"
if [[ ! -d /var/log/mycroft/ ]] ; then if [[ ! -d /var/log/mycroft/ ]] ; then
sudo mkdir /var/log/mycroft/ $SUDO mkdir /var/log/mycroft/
fi fi
sudo chmod 777 /var/log/mycroft/ $SUDO chmod 777 /var/log/mycroft/
fi fi
#Store a fingerprint of setup #Store a fingerprint of setup