forked from emanuele-scarsella/vortex-ubuntu-plymouth-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
uninstall
59 lines (46 loc) · 1.75 KB
/
uninstall
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
#!/usr/bin/env bash
# check if running as root user
if [ "$EUID" -ne 0 ]; then
echo -e "This script needs to run as root user, please use \"sudo ./uninstall\" instead";
exit 1;
fi
# removing vortex-ubuntu in the list of aviable themes
echo -n "updating plymouth themes alternatives ........................ " ;
update-alternatives --remove default.plymouth /usr/share/plymouth/themes/vortex-ubuntu/vortex-ubuntu.plymouth &> /dev/null ;
if [ $? -gt 0 ]; then
echo -e "\nan error occoured removing alternative in /usr/share/plymouth/themes/default.plymouth" ;
exit 1;
fi
echo "[done]" ;
# setting a new default plymouth theme;
echo "asking user to set a different theme ...... ................... [done]" ;
echo -e "\nDEFAULT OPTIONS ARE:" ;
echo -e "for Ubuntu 20.04 ... 1 /usr/share/plymouth/themes/bgrt/bgrt.plymouth\n" ;
update-alternatives --config default.plymouth ;
if [ $? -gt 0 ]; then
echo -e "\nan error occoured setting alternative in /usr/share/plymouth/themes/default.plymouth";
n=0 ;
while [ $? -gt 0 -a $n -le 3 ]; do
update-alternatives --config default.plymouth ;
n=$(( n+1 )) ;
done
exit 1;
fi
# updating Initial RAM File System
echo -n "updating Initial RAM File System ............................. " ;
update-initramfs -u &> /dev/null ;
if [ $? -gt 0 ]; then
echo -e "\nan error occoured executing \"update-initramfs -u\"";
exit 1;
fi
echo "[done]" ;
# check if plymouth themes directory exist
if [ -d "/usr/share/plymouth/themes/vortex-ubuntu" ]; then
echo -n "removing /usr/share/plymouth/themes/vortex-ubuntu ............ " ;
rm -r /usr/share/plymouth/themes/vortex-ubuntu ;
if [ $? -gt 0 ]; then
echo -e "\nan error occoured removing /usr/share/plymouth/themes/vortex-ubuntu" ;
exit 1;
fi
echo "[done]" ;
fi