-
Notifications
You must be signed in to change notification settings - Fork 3
/
install.sh
executable file
·34 lines (31 loc) · 950 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
#!/bin/sh
KERNEL=$(uname -s)
ARCH=$(uname -m)
if [ $KERNEL = "Darwin" ]
then
BINARY="https://github.com/LevInteractive/allwrite-docs/blob/master/build/darwin_amd64.tar.gz?raw=true"
elif [ $KERNEL = "Linux" ]
then
if [ $ARCH = "x86_64" ]
then
BINARY="https://github.com/LevInteractive/allwrite-docs/blob/master/build/linux_amd64.tar.gz?raw=true"
elif [ $ARCH = "x86" ]
then
BINARY="https://github.com/LevInteractive/allwrite-docs/blob/master/build/linux_386.tar.gz?raw=true"
elif [ $ARCH = "i386" ]
then
BINARY="https://github.com/LevInteractive/allwrite-docs/blob/master/build/linux_386.tar.gz?raw=true"
elif [ $ARCH = "i686" ]
then
BINARY="https://github.com/LevInteractive/allwrite-docs/blob/master/build/linux_386.tar.gz?raw=true"
else
echo "Unsupported OS: $ARCH"
exit 1
fi
else
echo "Unsupported OS: $ARCH"
exit 1
fi
curl -L $BINARY | tar xvz
mv -f allwrite-docs /usr/local/bin/
chmod +x /usr/local/bin/allwrite-docs