-
Notifications
You must be signed in to change notification settings - Fork 0
/
twuninstall.sh
executable file
·38 lines (30 loc) · 1 KB
/
twuninstall.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
#!/bin/bash
############################
# Uninstaller Script for H-Client by unsigned char*
#
# + FEATURES:
# Remove .desktop file in ~/.local/share/applications
# Remove symbolic link in ~/Desktop to .desktop file
# Remove symbolic link in /usr/local/bin to teeworlds binary
##################################################################################
TWNAMEBIN="teeworlds"
DFFILENAME="$HOME/.local/share/applications/$TWNAMEBIN.desktop"
DESKTOPF=$(xdg-user-dir DESKTOP)"/$TWNAMEBIN.desktop"
echo "Uninstalling H-Client..."
# Remove from desktop folder
if [ -f $DESKTOPF ]; then
unlink $DESKTOPF
fi
# Remove from local/bin folder
if [ -f "/usr/local/bin/$TWNAMEBIN" ]; then
sudo unlink "/usr/local/bin/$TWNAMEBIN"
fi
# Remove from applications folder
if [ -f $DFFILENAME ]; then
rm $DFFILENAME
fi
# Remove icon from share/pixmaps folder
if [ -f "/usr/share/pixmaps/teeworlds_hclient.png" ]; then
sudo rm "/usr/share/pixmaps/teeworlds_hclient.png"
fi
echo "H-Client uninstalled successfully :)"