Skip to content

Commit

Permalink
Update install.sh
Browse files Browse the repository at this point in the history
use $HOME instead of hard-coded pi user home path
  • Loading branch information
jneilliii authored Mar 24, 2024
1 parent e65b911 commit 0bcfe26
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -695,12 +695,12 @@ echo "Installing Dependencies ..."
exit -1
}

if [ -d "/home/pi/OctoPrint/venv" ]; then
DIRECTORY="/home/pi/OctoPrint/venv"
elif [ -d "/home/pi/oprint" ]; then
DIRECTORY="/home/pi/oprint"
if [ -d "$HOME/OctoPrint/venv" ]; then
DIRECTORY="$HOME/OctoPrint/venv"
elif [ -d "$HOME/oprint" ]; then
DIRECTORY="$HOME/oprint"
else
echo "Neither /home/pi/OctoPrint/venv nor /home/pi/oprint can be found."
echo "Neither $HOME/OctoPrint/venv nor $HOME/oprint can be found."
echo "If your OctoPrint instance is running on a different machine just type - in the following prompt."
text_input "Please specify OctoPrints full virtualenv path manually (no trailing slash)." DIRECTORY
fi;
Expand Down Expand Up @@ -834,7 +834,7 @@ EOF
sudo chmod +x ~/scripts/update-octodash

sudo bash -c 'cat >> /etc/sudoers.d/update-octodash' <<EOF
pi ALL=NOPASSWD: /home/pi/scripts/update-octodash
pi ALL=NOPASSWD: $HOME/scripts/update-octodash
EOF
fi

Expand Down

0 comments on commit 0bcfe26

Please sign in to comment.