grub2-themes/grub-theme-vimix/Install

33 lines
628 B
Plaintext
Raw Normal View History

2017-12-19 05:17:31 +01:00
#!/bin/bash
ROOT_UID=0
2018-05-22 13:05:27 +02:00
# check command avalibility
function has_command() {
command -v $1 > /dev/null
}
2017-12-19 05:17:31 +01:00
if [ "$UID" -eq "$ROOT_UID" ]; then
# Copy Vimix
cp -a Vimix /boot/grub/themes
# Set Vimix
grep "GRUB_THEME=" /etc/default/grub 2>&1 >/dev/null && sed -i '/GRUB_THEME=/d' /etc/default/grub
echo "GRUB_THEME=\"/boot/grub/themes/Vimix/theme.txt\"" >> /etc/default/grub
# update grub
2018-05-22 13:05:27 +02:00
if has_command update-grub; then
update-grub
elif has_command grub-mkconfig; then
grub-mkconfig -o /boot/grub/grub.cfg
fi
2017-12-19 05:17:31 +01:00
2018-05-22 13:05:27 +02:00
echo -e "\n All done!"
2017-12-19 05:17:31 +01:00
else
2018-05-22 13:05:27 +02:00
echo -e "\n Please run this script by root..."
2017-12-19 05:17:31 +01:00
fi