-
Notifications
You must be signed in to change notification settings - Fork 101
/
install.sh
38 lines (26 loc) · 926 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
#!/usr/bin/env bash
cd $HOME
if [[ -f .temp_slidy_installer ]]
then
rm -rf .temp_slidy_installer
fi
mkdir $(pwd)/.temp_slidy_installer
cd $(pwd)/.temp_slidy
THEARCH=$(uname -m)
THEBIT=$(getconf LONG_BIT)
if [[ $THEBIT == *64* ]]; then
echo "downloading the lastest slidy' version!"
THEURL=$(curl -s https://api.github.com/repos/Flutterando/slidy/releases | grep browser_download_url | grep 'linux-x64[.]tar[.]gz' | head -n 1 | cut -d '"' -f 4)
curl -L $THEURL > slidy_temp.tar.gz
fi
if [[ $THEBIT == *64* ]]; then
echo "downloading the lastest slidy' version!"
THEURL=$(curl -s https://api.github.com/repos/Flutterando/slidy/releases | grep browser_download_url | grep 'linux-ia32[.]tar[.]gz' | head -n 1 | cut -d '"' -f 4)
curl -L $THEURL > slidy_temp.tar.gz
fi
tar -xvzf slidy_temp.tar.gz
sudo cp slidy/slidy /usr/bin/
echo "Cleaning environment ..."
cd $HOME
rm -rf .temp_slidy_installer
slidy -v