-
Notifications
You must be signed in to change notification settings - Fork 2
/
uninstall.sh
35 lines (29 loc) · 1.02 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
#!/bin/bash
echo "This script will stop any running instances of gpu-fancurve and remove:"
echo "-The config file from $HOME/.config/gpu-fancurve.conf"
echo "-The program from /usr/local/bin/gpu-fancurve"
echo "-The autostart file from $HOME/.config/autostart/gpu-fancurve.desktop"
echo
echo "**sudo rights are required and you will be prompted for your sudo password**"
echo
#Prompt to continue
while true; do
read -p "Do you want to continue with the uninstall? (YES/no) " prompt
if [ "${prompt,,}" == "yes" ] || [ "${prompt,,}" == "y" ] || [ "${prompt,,}" == "" ]
then
break
elif [ "${prompt,,}" == "no" ] || [ "${prompt,,}" == "n" ]
then
echo "Cancelling uninstall, no changes have been made to the system."
exit
fi
echo "Sorry, I didn't understand that. Please type yes or no"
done
#kill process if running
pkill gpu-fancurve
#remove binary
sudo rm /usr/local/bin/gpu-fancurve
#remove config file
rm $HOME/.config/gpu-fancurve.conf
#remove autostart
rm $HOME/.config/autostart/gpu-fancurve.desktop