Skip to content

Commit

Permalink
Make scripts more versatile
Browse files Browse the repository at this point in the history
  • Loading branch information
UnchartedBull committed Oct 12, 2019
1 parent 8a04771 commit 801fa12
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 14 deletions.
21 changes: 15 additions & 6 deletions scripts/install-no-autostart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,21 @@ release=$(curl -s "https://api.github.com/repos/UnchartedBull/OctoDash/releases/
dependencies="libgtk-3-0 libnotify4 libnss3 libxss1 libxtst6 xdg-utils libatspi2.0-0 libuuid1 libappindicator3-1 libsecret-1-0 gir1.2-gnomekeyring-1.0"

echo "Installing OctoPrint Plugins"
~/OctoPrint/venv/bin/pip install -q "https://github.com/OllisGit/OctoPrint-DisplayLayerProgress/releases/latest/download/master.zip"
~/OctoPrint/venv/bin/pip install -q "https://github.com/vitormhenrique/OctoPrint-Enclosure/archive/master.zip"
~/OctoPrint/venv/bin/pip install -q "https://github.com/marian42/octoprint-preheat/archive/master.zip"
if [[ $* == *--ptg* ]]
then
~/OctoPrint/venv/bin/pip install -q "https://github.com/eyal0/OctoPrint-PrintTimeGenius/archive/master.zip"

if [ -d "/home/pi/OctoPrint/venv" ]; then
DIRECTORY="/home/pi/OctoPrint/venv"
elif [ -d "/home/pi/oprint" ]; then
DIRECTORY="/home/pi/oprint"
else
echo "Neither /home/pi/OctoPrint/venv nor /home/pi/oprint can be found. Please specify OctoPrints full virtualenv path manually (no trailing slash):"
read DIRECTORY
fi;

"$DIRECTORY"/bin/pip install -q "https://github.com/OllisGit/OctoPrint-DisplayLayerProgress/releases/latest/download/master.zip"
"$DIRECTORY"/bin/pip install -q "https://github.com/vitormhenrique/OctoPrint-Enclosure/archive/master.zip"
"$DIRECTORY"/bin/pip install -q "https://github.com/marian42/octoprint-preheat/archive/master.zip"
if [[ $* == *--ptg* ]]; then
"$DIRECTORY"/bin/pip install -q "https://github.com/eyal0/OctoPrint-PrintTimeGenius/archive/master.zip"
fi

echo "Installing Dependencies"
Expand Down
23 changes: 15 additions & 8 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,20 @@
release=$(curl -s "https://api.github.com/repos/UnchartedBull/OctoDash/releases/latest" | grep "browser_download_url.*armv7l.deb" | cut -d '"' -f 4)
dependencies="libgtk-3-0 libnotify4 libnss3 libxss1 libxtst6 xdg-utils libatspi2.0-0 libuuid1 libappindicator3-1 libsecret-1-0 gir1.2-gnomekeyring-1.0"

echo "Installing OctoPrint Plugins"
~/OctoPrint/venv/bin/pip install -q "https://github.com/OllisGit/OctoPrint-DisplayLayerProgress/releases/latest/download/master.zip"
~/OctoPrint/venv/bin/pip install -q "https://github.com/vitormhenrique/OctoPrint-Enclosure/archive/master.zip"
~/OctoPrint/venv/bin/pip install -q "https://github.com/marian42/octoprint-preheat/archive/master.zip"
if [[ $* == *--ptg* ]]
then
~/OctoPrint/venv/bin/pip install -q "https://github.com/eyal0/OctoPrint-PrintTimeGenius/archive/master.zip"
if [ -d "/home/pi/OctoPrint/venv" ]; then
DIRECTORY="/home/pi/OctoPrint/venv"
elif [ -d "/home/pi/oprint" ]; then
DIRECTORY="/home/pi/oprint"
else
echo "Neither /home/pi/OctoPrint/venv nor /home/pi/oprint can be found. Please specify OctoPrints full virtualenv path manually (no trailing slash):"
read DIRECTORY
fi;

"$DIRECTORY"/bin/pip install -q "https://github.com/OllisGit/OctoPrint-DisplayLayerProgress/releases/latest/download/master.zip"
"$DIRECTORY"/bin/pip install -q "https://github.com/vitormhenrique/OctoPrint-Enclosure/archive/master.zip"
"$DIRECTORY"/bin/pip install -q "https://github.com/marian42/octoprint-preheat/archive/master.zip"
if [[ $* == *--ptg* ]]; then
"$DIRECTORY"/bin/pip install -q "https://github.com/eyal0/OctoPrint-PrintTimeGenius/archive/master.zip"
fi

echo "Installing Dependencies"
Expand Down Expand Up @@ -46,4 +53,4 @@ echo "Setting Permission"
sudo chmod +x ~/.xinitrc
sudo chmod ug+s /usr/lib/xorg/Xorg

echo "Done. OctoDash will start automatically on next reboot."
echo "Done. OctoDash will start automatically on next reboot. Please ensure that auto-login is enabled."

0 comments on commit 801fa12

Please sign in to comment.