-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbash.sh
37 lines (31 loc) · 998 Bytes
/
bash.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
31
32
33
34
35
#!/bin/bash
# Install Nethunter
termux-setup-storage
apt update -y
apt upgrade -y -o Dpkg::Options::="--force-confold"
pkg install wget -y
wget -O install-nethunter-termux https://offs.ec/2MceZWr
chmod +x install-nethunter-termux
# Create answers file for prompts
touch /tmp/install-nethunter-termux-answers.txt
echo "1" >> /tmp/install-nethunter-termux-answers.txt
echo "y" >> /tmp/install-nethunter-termux-answers.txt
echo "y" >> /tmp/install-nethunter-termux-answers.txt
./install-nethunter-termux | while read line; do
if [[ "$line" == *"[?]"* && "$line" != *"[?][?]"* ]]; then
read -p "The script has encountered a [?] character. Please type 'y' and press enter to continue, or press any other key to exit: " choice
if [ "$choice" == "y" ]; then
echo "y" >> /tmp/install-nethunter-termux-answers.txt
else
echo "Installation Finished."
exit 1
fi
else
echo "$line"
fi
done
if [ $? -eq 0 ]; then
echo "crossdefalt"
else
echo "crossdefalt"
fi