-
Notifications
You must be signed in to change notification settings - Fork 8
/
uninstall.sh
executable file
·73 lines (59 loc) · 1.43 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
del() {
if [[ -e "$1" ]]; then
echo "path found, removing $1"
rm -r "$1"
else
echo "path not found: $1"
fi
}
main() {
for variant in cherry{,-solid,-square{,-solid},-midnight{,-solid,-square{,-solid}}}; do
del "$PREFIX/share/aurorae/themes/$variant"
done
local KVANTUM="$PREFIX/share/Kvantum"
# Special Kvantum dest for user-specific install
[[ $EUID -ne 0 ]] && KVANTUM="$HOME/.config/Kvantum"
for variant in cherry{,-solid,-midnight{,-solid}}; do
del "$KVANTUM/$variant"
done
for variant in cherry{,midnight}; do
del "$PREFIX/share/plasma/look-and-feel/com.github.nullxception.${variant}"
done
for variant in cherry{,-solid,-midnight{,-solid}}; do
del "$PREFIX/share/plasma/desktoptheme/$variant"
done
for variant in cherry{,-midnight}; do
del "$PREFIX/share/konsole/${variant}.colorscheme"
done
for variant in Cherry{,Midnight}; do
del "$PREFIX/share/color-schemes/${variant}.colors"
done
del "$PREFIX/share/wallpapers/cherry"
}
if [[ $EUID -ne 0 ]]; then
PREFIX="$HOME/.local"
elif [[ -z "$PREFIX" ]]; then
PREFIX=/usr
fi
parsed=$(getopt --options=p: --longoptions=prefix: --name "$0" -- "$@")
if [ $? -ne 0 ]; then
echo 'Invalid argument, exiting.' >&2
exit 1
fi
eval set -- "$parsed"
unset parsed
while true; do
case "$1" in
"-p" | "--prefix")
PREFIX="$2"
shift 2
;;
"--")
shift
break
;;
*) ;;
esac
done
main "$@"