-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.bash
More file actions
30 lines (26 loc) · 827 Bytes
/
install.bash
File metadata and controls
30 lines (26 loc) · 827 Bytes
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
#!/usr/bin/env bash
base_url = "https://github.com/limebrains/sufler/archive/master.zip"
if [ -z "$install_dir" ]; then
install_dir="${HOME}"
else
if [ "${install_dir:0:1}" == "~" ]; then
install_dir="${HOME}${install_dir:1}"
fi
if [ "${install_dir: -1}" == "/" ]; then
install_dir="${install_dir:0:${#install_dir}-1}"
fi
fi
curl -fsSL $base_url -o sufler.zip
if [ ! -f sufler.zip ]; then
printf "\n\e[1;31mInstallation unsuccessful due to failed download\e[0m\n"
exit
fi
unzip -o sufler.zip -d "$install_dir"
rm -f sufler.zip
if [ ! -d "$install_dir/.sufler" ]; then
printf "\n\e[1;31mSufler installation unsuccessful due to failed unzip\e[0m\n"
exit
fi
pip install -e "$install_dir/.sufler/sufler-master/"
sufler install
printf "\n\e[1;32mInstallation completed\e[0m\n"