-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
uninstall.sh
executable file
·49 lines (42 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env bash
echo "Uninstalling gitstart..."
# check installation
install_path=$(command -v gitstart)
gitstart_config=$HOME/.gitstart_config
# awesome installation path $HOME/.local/share/bin
# brew installation path $(brew --prefix)/bin
# Ubuntu installtion path /usr
if [ -f "$gitstart_config" ]; then
echo "Removing gitstart_config..."
rm "$gitstart_config" || {
echo "Please removed $gitstart_config."
}
fi
echo "Removing gitstart script..."
case "$install_path" in
*local/share*)
# awesome
rm "$install_path" || {
echo "Please remove $install_path."
}
;;
*brew*)
# brew
brew uninstall gitstart || {
echo "Please remove $install_path."
}
brew untap shinokada/gitstart
;;
*usr/bin*)
# debian package
sudo apt remove gitstart || {
echo "Please remove $install_path."
}
;;
*)
# unknown
echo "Not able to find your installation method."
echo "Please uninstall gitstart script."
;;
esac
echo "Uninstalltion completed."