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 39aaed7
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 "~/OctoPrint/venv" ]; then
DIRECTORY="~/OctoPrint/venv"
elif [ -d "~/oprint" ]; then
DIRECTORY="~/oprint"
else
echo "Neither ~/OctoPrint/venv nor ~/oprint can be found. Please specify OctoPrints virtualenv path manually:"
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 "~/OctoPrint/venv" ]; then
DIRECTORY="~/OctoPrint/venv"
elif [ -d "~/oprint" ]; then
DIRECTORY="~/oprint"
else
echo "Neither ~/OctoPrint/venv nor ~/oprint can be found. Please specify OctoPrints virtualenv path manually:"
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 39aaed7

Please sign in to comment.