-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuninstall.sh
executable file
·47 lines (40 loc) · 1.41 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
#!/usr/bin/env bash
# This script "uninstalls" the yuse wrapper package on your system.
set -e
areYouSure() {
userprompt=""
clear
printf "Are you sure you want to uninstall yuse? [y/n]\n> "
read userprompt
if [[ $userprompt == "y" ]]; then
userprompt=""
printf "This poor kitten will be very sad if you do that, do you really want to make this cute creature suffer?"
printf "
|\---/| ´
| o o | -----
"
printf "If you really want to commit this atrocity, type \"yes\". [yes]\n> "
read userprompt
if [[ $userprompt == "yes" ]]; then
echo "YES?? Ok, you'll have to live with it. You've traded the happiness of that little kitten for the uninstallation of a small script of less than 1mb. I hope you can sleep tonight thinking about it."
uninstall
else
printf "I didn't understand your answer, so I'll take it as no.\nThank you for making this kitten happy. \n"
fi
fi
}
uninstall() {
if [[ -L /usr/bin/yuse ]]; then
sudo rm /usr/bin/yuse
fi
if [[ -d /opt/yuse-crosspkg ]]; then
local files="install.sh LICENSE README.md yuse.sh"
for item in $files
do
sudo rm "/opt/yuse-crosspkg/$item"
done
echo "Yuse has been successfully uninstalled"
sudo rm -r /opt/yuse-crosspkg
fi
}
areYouSure