-
-
Notifications
You must be signed in to change notification settings - Fork 228
/
Copy pathupdate.sh
22 lines (15 loc) · 794 Bytes
/
update.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
arch=$(uname -m)
if [[ $arch == x86_64 ]]; then
releaseURL=$(curl -s "https://api.github.com/repos/UnchartedBull/OctoDash/releases/latest" | grep "browser_download_url.*amd64.deb" | cut -d '"' -f 4)
elif [[ $arch == aarch64 ]]; then
releaseURL=$(curl -s "https://api.github.com/repos/UnchartedBull/OctoDash/releases/latest" | grep "browser_download_url.*arm64.deb" | cut -d '"' -f 4)
elif [[ $arch == arm* ]]; then
releaseURL=$(curl -s "https://api.github.com/repos/UnchartedBull/OctoDash/releases/latest" | grep "browser_download_url.*armv7l.deb" | cut -d '"' -f 4)
fi
echo "Updating OctoDash"
cd ~
wget -O octodash.deb $releaseURL -q --show-progress
sudo dpkg -i octodash.deb
rm octodash.deb
echo "Done. Restart your Raspberry Pi to start the newest version!"