-
Notifications
You must be signed in to change notification settings - Fork 0
/
UNINSTALL.sh
executable file
·59 lines (49 loc) · 1.46 KB
/
UNINSTALL.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
FOLDER_NAME=$(basename "$PWD")
CURRENT_DIR=$(pwd)
BLACK=0
RED=1
GREEN=2
BLUE=4
WHITE=7
tput setab $BLUE
tput setaf $BLACK
echo " "
echo "This script will remove SUGO on your system, would you like to proceed? (y/N)"
echo " "
tput sgr0
read CONFIRM
if [[ "$CONFIRM" != 'y' && "$CONFIRM" != 'Y' && "$CONFIRM" = "" ]]; then
tput setab $RED
tput setaf $BLACK
echo " "
echo "Aborted uninstall."
echo "Press enter to quit ..."
echo " "
tput sgr0
read ASD
exit 1
fi
if [[ "$CURRENT_DIR" != "/opt/sugo" ]]; then
tput setab $RED
tput setaf $BLACK
echo " "
echo "Aborted uninstall. Wrong folder. Terminating ..."
echo "Press enter to quit ..."
echo " "
tput sgr0
read ASD
exit 1
fi
echo "Removing files ..."
sudo rm -r $CURRENT_DIR
sudo rm /usr/share/applications/sugo.desktop
sudo rm /usr/share/applications/uninstall_sugo.desktop
tput setaf $BLACK
tput setab $GREEN
echo " "
echo "Uninstall completed succsessfully!"
echo "Press enter to quit ..."
echo " "
tput sgr0
read ASD