File tree Expand file tree Collapse file tree 6 files changed +22
-274
lines changed Expand file tree Collapse file tree 6 files changed +22
-274
lines changed Original file line number Diff line number Diff line change 1
1
LINT_FILES := setup \
2
2
setup-root \
3
- ksau \
4
- termux/setup \
5
- termux/ksau \
3
+ ksau
6
4
7
5
lint :
8
6
shfmt -i 4 -w $(LINT_FILES )
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ curl -s https://raw.githubusercontent.com/noobyysauraj/global_index_source/maste
18
18
19
19
### For Termux user.
20
20
```
21
- curl -s https://raw.githubusercontent.com/noobyysauraj/global_index_source/master/termux/ setup | bash
21
+ curl -s https://raw.githubusercontent.com/noobyysauraj/global_index_source/master/setup | bash
22
22
```
23
23
### Once tool is installed, run setup.
24
24
```
Original file line number Diff line number Diff line change @@ -21,6 +21,14 @@ readonly status_dir="$(mktemp -d)"
21
21
trap " rm -rf $status_dir " EXIT
22
22
23
23
dependencies () {
24
+ if declare -p TERMUX_VERSION & > /dev/null; then
25
+ echo " Starting Installation...."
26
+ pkg install rclone jq -y > /dev/null 2>&1
27
+ echo " "
28
+ echo " ${orange} Installation Completed. ${normal} "
29
+ return
30
+ fi
31
+
24
32
echo " "
25
33
echo " Make sure you have sudo privilages"
26
34
echo " This will only work for Linux/macOS/BSD systems."
Original file line number Diff line number Diff line change @@ -6,12 +6,20 @@ orange=$(echo -en "\e[33m")
6
6
aqua=$( echo -en " \e[36m" )
7
7
lightgreen=$( echo -en " \e[92m" )
8
8
9
- echo " Make sure you have sudo privilages"
9
+ if declare -p TERMUX_VERSION & > /dev/null; then
10
+ SUDO=" "
11
+ INSTALLDIR=$PREFIX /bin/ksau
12
+ else
13
+ SUDO=sudo
14
+ INSTALLDIR=/usr/local/bin/ksau
15
+ echo " Make sure you have sudo privileges"
16
+ fi
17
+
10
18
rm ksau > /dev/null 2>&1
11
- sudo rm /usr/local/bin/ksau > /dev/null 2>&1
19
+ $SUDO rm $INSTALLDIR > /dev/null 2>&1
12
20
curl https://raw.githubusercontent.com/noobyysauraj/global_index_source/master/ksau > ksau 2> /dev/null
13
- sudo mv ksau /usr/local/bin
14
- chmod +x /usr/local/bin/ksau
21
+ $SUDO mv ksau $INSTALLDIR
22
+ chmod +x $INSTALLDIR
15
23
16
24
if ! command -v ksau & > /dev/null; then
17
25
echo " ${orange} Installation Failed !!!"
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments