-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathupdate.sh
More file actions
34 lines (29 loc) · 991 Bytes
/
update.sh
File metadata and controls
34 lines (29 loc) · 991 Bytes
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
#!/bin/bash
# Check if the T-DoS directory exists in the user's home directory
if [ -d "$HOME/T-DoS" ]; then
echo "Removing old T-DoS directory..."
rm -rf "$HOME/T-DoS"
fi
# Change to the user's home directory and create a new T-DoS directory
cd "$HOME" || exit
mkdir "$HOME/T-DoS" || { echo "Failed to create T-DoS directory"; exit 1; }
# Clone the T-DoS repository from GitHub
echo "Updating T-DoS..."
printf " [\033[0;36m"
git clone https://github.com/ParzivalHack/T-DoS "$HOME/T-DoS" >/dev/null 2>&1 &
while kill -0 $! >/dev/null 2>&1; do
printf "▓"
sleep 1
done
wait $!
# Check if the clone was successful
if [ $? -ne 0 ]; then
echo -e "\033[0;31m ERROR\033[0m]"
echo "Failed to update T-DoS, please check your internet connection and try again."
exit 1
fi
# Display success message and run T-DoS script
echo -e "\033[0;32m DONE\033[0m]"
echo "T-DoS has been updated to the latest version!"
cd "$HOME/T-DoS" || exit
python T-DoS.py