forked from ksauraj/global_index_source
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup
30 lines (26 loc) · 734 Bytes
/
setup
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
#!/bin/bash
#Define colors
normal=$(echo -en "\e[0m")
orange=$(echo -en "\e[33m")
aqua=$(echo -en "\e[36m")
lightgreen=$(echo -en "\e[92m")
if declare -p TERMUX_VERSION &>/dev/null; then
SUDO=""
INSTALLDIR=$PREFIX/bin/ksau
else
SUDO=sudo
INSTALLDIR=/usr/local/bin/ksau
echo "Make sure you have sudo privileges"
fi
rm ksau >/dev/null 2>&1
$SUDO rm $INSTALLDIR >/dev/null 2>&1
curl https://raw.githubusercontent.com/ksauraj/global_index_source/master/ksau >ksau 2>/dev/null
$SUDO mv ksau $INSTALLDIR
chmod +x $INSTALLDIR
if ! command -v ksau &>/dev/null; then
echo "${orange}Installation Failed !!!"
echo "Posssible Solution : Don't run as root or check Root version.${normal}"
exit
else
ksau
fi