-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuninstall
executable file
·44 lines (34 loc) · 1006 Bytes
/
uninstall
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
#!/usr/bin/env bash
set -e
[ ! -e install-functions.sh ] && echo -e "\e[31mThe uninstaller must be started from bash-completer directory.\e[0m" && exit 1
source 'install-functions.sh'
cat <<MSG
You are about to uninstall bash-completer.
This operation will require root privileges, as for the installation.
MSG
while true
do
echo -n "Continue the uninstallation [Y/n] "
read continueUninstallation
if [ "$continueUninstallation" == "n" ] || [ "$continueInstallation" == "N" ]
then
echo "Good. We though you did not like us."
exit 0
elif [ -z "$continueUninstallation" ] || [ "$continueUninstallation" == "y" ] || [ "$continueInstallation" == "Y" ]
then
break
else
echo -e "\e[31mInvalid choice\e[0m"
## loop again
fi
done
echo ""
uninstall
echo -en "\e[34m"
cat <<NOTES
bash-completer in now uninstalled.
If you ever want to re-install it, you can always execute ./install
You can now remove the folder ~/.bash-completer.
NOTES
echo -e "Adios ...\e[0m"
exit 0