forked from pystardust/ani-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·37 lines (30 loc) · 1.01 KB
/
install
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
#!/bin/sh
REPO="https://github.com/dabigblob/ani-cli.git"
case "$(uname)" in
Darwin*)
ins_base="$(brew --prefix)"
;;
Linux*)
case "$(uname -o)" in #the bsd version of uname does not support -o
Android*)
ins_base="/data/data/com.termux/files/usr"
;;
*)
#we're not considering non-GNU systems here as the -o flag is gnu coreutil specific
ins_base="/usr/local"
;;
esac
;;
MINGW64*) #we keep this case separate as there could be a better place to install in git bash
ins_base="/usr/local"
;;
*)
printf "This uninstaller is only for Windows, Android, Linux and MacOS. Bye."
exit 1
;;
esac
mkdir -p "${ins_base}/share" "${ins_base}/bin"
rm -rf "${ins_base}/share/ani-cli" "${ins_base}/bin/ani-cli"
git clone -b "master" "$REPO" "${ins_base}/share/ani-cli"
ln -sf "${ins_base}/share/ani-cli/ani-cli" "${ins_base}/bin/ani-cli"
exit 0