Skip to content

Commit

Permalink
Fix install scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
UnchartedBull committed Aug 13, 2019
1 parent 1ef5087 commit 3c57884
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 98 deletions.
13 changes: 10 additions & 3 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,16 @@
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
"assets": [{
"glob": "!(config.testing.json)",
"input": "src/assets/",
"output": "/assets/"
},
{
"glob": "favicon.ico",
"input": "src/",
"output": "/"
}
],
"styles": [
"src/styles.scss"
Expand Down
66 changes: 47 additions & 19 deletions sample.config.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,51 @@
{
"config": {
"octoprint": {
"url": "http://localhost:5000/api/",
"accessToken": "INSERT API KEY HERE",
"apiInterval": 1500
},
"printer": {
"name": "NAME HERE"
},
"filament": {
"thickness": 0,
"density": 0
},
"octodash": {
"touchscreen": true,
"temperatureSensor": {
"type": 22,
"gpio": 0
"octoprint": {
"url": "http://localhost:5000/api/",
"accessToken": "INSERT API KEY HERE",
"apiInterval": 15000
},
"printer": {
"name": "NAME HERE",
"xySpeed": 100,
"zSpeed": 5
},
"filament": {
"thickness": 0,
"density": 0
},
"octodash": {
"touchscreen": true,
"temperatureSensor": null,
"customActions": [{
"icon": "home",
"command": "G28",
"color": "#dcdde1"
},
{
"icon": "ruler-vertical",
"command": "G29",
"color": "#44bd32"
},
{
"icon": "fire-alt",
"command": "M140 S50; M104 S185",
"color": "#e1b12c"
},
{
"icon": "snowflake",
"command": "M140 S0; M104 S0",
"color": "#0097e6"
},
{
"icon": "redo-alt",
"command": "[!RELOAD]",
"color": "#7f8fa6"
},
{
"icon": "skull",
"command": "[!KILL]",
"color": "#e84118"
}
}
]
}
}
22 changes: 11 additions & 11 deletions scripts/install-no-autostart.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
#!/bin/bash

release = curl --silent "https://api.github.com/repos/UnchartedBull/OctoDash/releases/latest" | jq -r '.assets[] | select(.name | endswith("armv7l.deb")).browser_download_url'
dependencies="libsecret-common libgnome-keyring-common libgnome-keyring0 libnotify4 libindicator3-7 libappindicator3-1 libdbusmenu-gtk3-4 libdbusmenu-glib4 libsecret-1-0 indicator-application indicator-common gir1.2-gnomekeyring-1.0"
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 "https://github.com/UnchartedBull/OctoPrint-DisplayLayerProgress/archive/master.zip"
~/OctoPrint/venv/bin/pip install "https://github.com/eyal0/OctoPrint-PrintTimeGenius/archive/master.zip"
~/OctoPrint/venv/bin/pip install -q "https://github.com/UnchartedBull/OctoPrint-DisplayLayerProgress/archive/master.zip"
if [[ $* == *--ptg* ]]
then
~/OctoPrint/venv/bin/pip install -q "https://github.com/eyal0/OctoPrint-PrintTimeGenius/archive/master.zip"
fi

echo "Installing Dependencies"
apt update
apt install $dependencies -y

cd ~
sudo apt -qq update
sudo apt -qq install $dependencies -y

echo "Installing OctoDash"
wget -O octodash.deb $release
cd ~
wget -O octodash.deb $release -q --show-progress

sudo dpkg -i octodash.deb

rm octodash.deb

echo "Done. You can now start OctoDash via the command octodash."
26 changes: 14 additions & 12 deletions scripts/install.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
#!/bin/bash

release = curl --silent "https://api.github.com/repos/UnchartedBull/OctoDash/releases/latest" | jq -r '.assets[] | select(.name | endswith("armv7l.deb")).browser_download_url'
dependencies="xserver-xorg --no-install-recommends ratpoison x11-xserver-utils xinit libsecret-common libgnome-keyring-common libgnome-keyring0 libnotify4 libindicator3-7 libappindicator3-1 libdbusmenu-gtk3-4 libdbusmenu-glib4 libsecret-1-0 indicator-application indicator-common gir1.2-gnomekeyring-1.0"
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 "https://github.com/UnchartedBull/OctoPrint-DisplayLayerProgress/archive/master.zip"
~/OctoPrint/venv/bin/pip install "https://github.com/eyal0/OctoPrint-PrintTimeGenius/archive/master.zip"
~/OctoPrint/venv/bin/pip install -q "https://github.com/UnchartedBull/OctoPrint-DisplayLayerProgress/archive/master.zip"
if [[ $* == *--ptg* ]]
then
~/OctoPrint/venv/bin/pip install -q "https://github.com/eyal0/OctoPrint-PrintTimeGenius/archive/master.zip"
fi

echo "Installing Dependencies"
apt update
apt install $dependencies -y

cd ~
sudo apt -qq update
sudo apt -qq install $dependencies -y

echo "Installing OctoDash"
wget -O octodash.deb $release
cd ~
wget -O octodash.deb $release -q --show-progress

sudo dpkg -i octodash.deb

Expand All @@ -33,13 +35,13 @@ octodash
EOF

cat <<EOF >> ~/.bashrc
if [ -z "$SSH_CLIENT" ] || [ -z "$SSH_TTY" ]; then
if [ -z "\$SSH_CLIENT" ] || [ -z "\$SSH_TTY" ]; then
xinit -- -nocursor
fi
EOF

echo "Setting Permission"
chmod +x ~/.xinitrc
chmod ug+s /usr/lib/xorg/Xorg
sudo chmod +x ~/.xinitrc
sudo chmod ug+s /usr/lib/xorg/Xorg

echo "Done. OctoDash will start automatically on next reboot."
6 changes: 4 additions & 2 deletions scripts/update.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
release = curl --silent "https://api.github.com/repos/UnchartedBull/OctoDash/releases/latest" | jq -r '.assets[] | select(.name | endswith("armv7l.deb")).browser_download_url'
#!/bin/bash

release=$(curl -s "https://api.github.com/repos/UnchartedBull/OctoDash/releases/latest" | grep "browser_download_url.*armv7l.deb" | cut -d '"' -f 4)

echo "Updating OctoDash"

cd ~

wget -O octodash.deb $release
wget -O octodash.deb $release -q --show-progress

sudo dpkg -i octodash.deb

Expand Down
51 changes: 0 additions & 51 deletions src/assets/config.json

This file was deleted.

0 comments on commit 3c57884

Please sign in to comment.