-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
39 lines (36 loc) · 846 Bytes
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
OS=$(uname -s)
MACHINE=$(uname -m)
VERSION=$(curl -s https://api.github.com/repos/mattblack85/astro_monitor/releases/latest | grep '"tag_name":' | grep -Eo 'v.*[0-9]')
PACKAGE_NAME=astromonitor
EXTENSION=tar.gz
case $OS in
Linux)
case $MACHINE in
x86_64)
ARCH=linux-amd64
;;
armv7l)
ARCH=armv7
;;
aarch64)
ARCH=arm64
esac
;;
Darwin)
case $MACHINE in
x86_64)
ARCH=macos-x64
;;
arm64)
ARCH=macos-arm64
;;
esac
;;
*)
echo "OS not supported, please raise an issue at https://github.com/MattBlack85/astro_monitor/issues giving the result of `uname -s` and `uname -m`"
;;
esac
wget https://github.com/MattBlack85/astro_monitor/releases/download/$VERSION/$PACKAGE_NAME-$ARCH-$VERSION.$EXTENSION
tar -xvzf astromonitor*.tar.gz
rm astromonitor*tar.gz
sudo mv astromonitor /usr/local/bin/