grub2-themes/grub-theme-vimix/Install
vinceliuice c4527c73d9 update
2018-05-22 19:08:29 +08:00

33 lines
628 B
Bash
Executable File

#!/bin/bash
ROOT_UID=0
# check command avalibility
function has_command() {
command -v $1 > /dev/null
}
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
if has_command update-grub; then
update-grub
elif has_command grub-mkconfig; then
grub-mkconfig -o /boot/grub/grub.cfg
fi
echo -e "\n All done!"
else
echo -e "\n Please run this script by root..."
fi