-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuninstall.sh
executable file
·54 lines (33 loc) · 1022 Bytes
/
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
GLOBAL_ICONS="/usr/share/icons/"
LOCAL_ICONS="$HOME/.local/share/icons/"
YARU_INDEX="/usr/share/icons/Yaru/index.theme"
is_user=$1
if [ "$is_user" = "--user" ]; then
if test -d "$LOCAL_ICONS/YaruX"; then
rm -r "$LOCAL_ICONS/YaruX"
echo "---------------------------------------------"
echo " Removed local YaruX install..."
echo "---------------------------------------------"
fi
elif [ "$is_user" = "" ]; then
echo
echo "No --user param: Defaulting to system uninstallation "
echo
if test -d "$GLOBAL_ICONS/YaruX"; then
sudo rm -r "$GLOBAL_ICONS/YaruX"
echo "---------------------------------------------"
echo " Removed global YaruX install..."
echo "---------------------------------------------"
echo
fi
else
echo "only --user on no parameter is allowed."
exit 0
fi
echo
echo
echo "Reverting to original Yaru/index.theme"
echo
sudo sed -i -e "s/Inherits=YaruX,/Inherits=/g" "$YARU_INDEX"
echo "RESULT AFTER:"
cat $YARU_INDEX | grep "Inherits"