forked from gustawho/grub2-theme-breeze
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·54 lines (49 loc) · 1.71 KB
/
install.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
#!/usr/bin/env bash
main() {
if [ -d "/boot/grub" ]
then
echo -e "\e[1m\e[32m==> \e[97mCopying files...\e[0m"
cp -rf breeze /boot/grub/themes/
else
echo -e "\e[1m\e[32m==> \e[97mCopying files...\e[0m"
cp -rf breeze /boot/grub2/themes/
fi
echo -e "\e[1m\e[97m You must set the theme in your GRUB config file,"
while : ;do
if [ "$answer" = "g" ];then
echo -e "\e[1m\e[97m You didn't give a valid option, try again."
else
read -p " Would you like to do it now? [y/n] " -t 10 answer
echo -e "\e[0m"
if [ "$answer" = "y" ];then
if [ -d "/boot/grub" ];then
echo -e " \e[5mEdit the line that begins with GRUB_THEME\e[0m"
echo -e " \e[7mGRUB_THEME=/boot/grub/themes/breeze/theme.txt\e[0m"
sleep 5
nano /etc/default/grub
echo -e "\e[1m\e[32m==> \e[97mApplying changes...\e[0m"
grub-mkconfig -o /boot/grub/grub.cfg
echo -e "\e[1m\e[34m -> \e[97mTheme successfully applied!"
echo -e "\e[1m\e[34m -> \e[97mRestart your PC to check it out."
sleep 2
break
else
echo -e " \e[5mEdit the line that begins with GRUB_THEME\e[0m"
echo -e " \e[7mGRUB_THEME=/boot/grub2/themes/breeze/theme.txt\e[0m"
sleep 5
nano /etc/default/grub
echo -e "\e[1m\e[32m==> \e[97mApplying changes...\e[0m"
grub2-mkconfig -o /boot/grub2/grub.cfg
echo -e "\e[1m\e[34m -> \e[97mTheme successfully applied!"
echo -e "\e[1m\e[34m -> \e[97mRestart your PC to check it out."
sleep 2
break
fi
elif [ "$answer" = "n" ];then
break
fi
let answer=g
fi
done
}
main "$@"