-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·57 lines (48 loc) · 1.28 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/sh
BIN_DIR=$(pwd)
THE_ARCH_BIN=''
THIS_PROJECT_NAME='instachart'
THISOS=$(uname -s)
ARCH=$(uname -m)
case $THISOS in
Linux*)
case $ARCH in
arm64)
THE_ARCH_BIN="$THIS_PROJECT_NAME-linux-arm64"
;;
aarch64)
THE_ARCH_BIN="$THIS_PROJECT_NAME-linux-arm64"
;;
armv6l)
THE_ARCH_BIN="$THIS_PROJECT_NAME-linux-arm"
;;
armv7l)
THE_ARCH_BIN="$THIS_PROJECT_NAME-linux-arm"
;;
*)
THE_ARCH_BIN="$THIS_PROJECT_NAME-linux-amd64"
;;
esac
;;
Darwin*)
case $ARCH in
arm64)
THE_ARCH_BIN="$THIS_PROJECT_NAME-darwin-arm64"
;;
*)
THE_ARCH_BIN="$THIS_PROJECT_NAME-darwin-amd64"
;;
esac
;;
Windows|MINGW64_NT*)
THE_ARCH_BIN="$THIS_PROJECT_NAME-windows-amd64.exe"
THIS_PROJECT_NAME="$THIS_PROJECT_NAME.exe"
;;
esac
if [ -z "$THE_ARCH_BIN" ]; then
echo "This script is not supported on $THISOS and $ARCH"
exit 1
fi
curl -kL --progress-bar https://github.com/kevincobain2000/$THIS_PROJECT_NAME/releases/latest/download/$THE_ARCH_BIN -o $BIN_DIR/$THIS_PROJECT_NAME
chmod +x $BIN_DIR/$THIS_PROJECT_NAME
echo "Installed successfully to: $BIN_DIR/$THIS_PROJECT_NAME"