-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
install.sh
executable file
·73 lines (67 loc) · 1.57 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
#
# Copyright © 2019, "Vipul Jha" <vipuljha08@gmail.com>
# "LordShenron" <priyanshu19111999@gmail.com>
#
# This software is licensed under the terms of the GNU General Public
# License version 2, as published by the Free Software Foundation, and
# may be copied, distributed, and modified under those terms.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# Please maintain this if you use this script or any part of it
GREEN='\033[01;32m'
YELLOW='\e[0;33m'
RESET='\033[0m'
ROOT_UID=0
# Functions
set()
{
grep "GRUB_THEME=" /etc/default/grub 2>&1 >/dev/null && sed -i '/GRUB_THEME=/d' /etc/default/grub
echo "GRUB_THEME=\"/boot/grub/themes/Griffin/theme.txt\"" >> /etc/default/grub
}
if [ "$UID" -eq "$ROOT_UID" ]; then
# Copy Griffin
cp -a Griffin /boot/grub/themes
echo -e "$GREEN"
echo "======================"
echo "= Griffin Grub Theme ="
echo "======================"
echo -e "$YELLOW"
echo "1. Arch"
echo "2. Ubuntu"
echo "3. Exit"
echo -e "$RESET"
echo ""
while read -p "$(tput setaf 209)Choose your distro:$(tput sgr0) " cchoice
do
case "$cchoice" in
1)
set
grub-mkconfig -o /boot/grub/grub.cfg
break
;;
2)
set
update-grub
break
;;
3)
exit 0
break
;;
* )
echo
echo "Invalid input! Try again."
exit 0;
break
;;
esac
done
else
echo -e "Please run this script with root!"
notify-send "Please run this script with root!" -i notification
fi