-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathupdater-termux
69 lines (56 loc) · 1.53 KB
/
updater-termux
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash
W="\033[0;37m"
G="\033[0;32m"
R="\033[0;31m"
Y="\033[0;33m"
cd ..
printf "$W[$R*$W] Welcome to Hunter-Toolkit updater for Termux!\n"
sleep 1.25
printf "$W[$R*$W] Do you want to start the updater? y/n "
read START
if [[ $START == "y" || $START == "Y" ]]; then
printf "$W[$R*$W] Starting the updater ...\n"
sleep 1.25
elif [[ $START == "n" || $START == "N" ]]; then
printf "$W[$R*$W] All right, thank you for choosing the Hunter-Toolkit!\n"
exit 0
else
printf "$W[$R*$W] Invalid input, try again!\n"
exit 1
fi
printf "$W[$R*$W] Removing Hunter-Toolkit ...\n"
sleep 1.25
if [ -d "Hunter-Toolkit" ]; then
rm -rf Hunter-Toolkit
fi
printf "$W[$G+$W] Done.\n"
sleep 1.25
printf "$W[$R*$W] Check if git is installed ...\n"
sleep 1.25
if ! command -v git &> /dev/null; then
pkg update -y && pkg install git -y
fi
printf "$W[$G+$W] Done.\n"
sleep 1.25
printf "$W[$R*$W] Getting Hunter-Toolkit ...\n"
if git clone https://github.com/Keyj33k/htkit.git; then
printf "$W[$G+$W] Done.\n"
else
printf "$W[$Y-$W] Failed getting Hunter-Toolkit!\n"
exit 1
fi
sleep 1.25
printf "$W[$R*$W] Do you want to start the Hunter-Toolkit? y/n "
read CHOICE
if [[ $CHOICE == "y" || $CHOICE == "Y" ]]; then
printf "$W[$R*$W] Starting the Hunter-Toolkit ...\n"
sleep 1.25
python3 htkit
exit 0
elif [[ $CHOICE == "n" || $CHOICE == "N" ]]; then
printf "$W[$R*$W] All right, thank you for choosing the Hunter-Toolkit!\n"
exit 0
else
printf "$W[$Y-$W] Invalid Input!\n"
exit 1
fi