-
Notifications
You must be signed in to change notification settings - Fork 5
/
UNINSTALL.sh
executable file
·64 lines (53 loc) · 1.62 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
60
61
62
63
64
#!/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 PESTO 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/pesto" ]]; 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/basilico.desktop
sudo rm /usr/share/applications/pinolo.desktop
sudo rm /usr/share/applications/uninstall_pinolo.desktop
sudo rm /etc/systemd/system/basilico.service
echo "Updating systemd ..."
sudo systemctl daemon-reload
tput setaf $BLACK
tput setab $GREEN
echo " "
echo "Uninstall completed succsessfully!"
echo "Press enter to quit ..."
echo " "
tput sgr0
read ASD