-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
30 lines (27 loc) · 946 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
#!/usr/bin/env bash
# Author: AshkanRafiee - https://github.com/AshkanRafiee/
currentVersion="1.5"
prefix="/usr/local"
install()
{
read -p "M for Mac, L For Linux or C to Cancel [Mm/Ll/Cc]: " answer
answer=${answer:-C}
if [[ "$answer" == [Mm] ]]; then
echo -n "Installing RaheHal: "
chmod a+x MacOSX/RaheHal
cp MacOSX/RaheHal $prefix/bin > /dev/null 2>&1 || { echo "Failure"; echo "Error copying file, try running install script as sudo"; exit 1; }
echo "Success"
elif [[ "$answer" == [Ll] ]]; then
echo -n "Installing RaheHal: "
chmod a+x Linux/RaheHal
cp Linux/RaheHal $prefix/bin > /dev/null 2>&1 || { echo "Failure"; echo "Error copying file, try running install script as sudo"; exit 1; }
echo "Success"
elif [[ "$answer" == [Cc] ]]; then
echo -n "Installation Canceled!"
else
echo -n "Use The Following Options: "
echo -n "M for Mac, L For Linux or C to Cancel!"
fi
}
install
exit 0