mirror of
https://github.com/vinceliuice/grub2-themes.git
synced 2024-11-05 17:26:14 +01:00
Update install.sh
This commit is contained in:
parent
967a302d8f
commit
d0a481efa1
@ -120,7 +120,9 @@ install() {
|
|||||||
prompt -s "\n Setting ${theme} as default..."
|
prompt -s "\n Setting ${theme} as default..."
|
||||||
|
|
||||||
# Backup grub config
|
# Backup grub config
|
||||||
cp -an /etc/default/grub /etc/default/grub.bak
|
if [[ ! -f "/etc/default/grub.bak" ]]; then
|
||||||
|
cp -an /etc/default/grub /etc/default/grub.bak
|
||||||
|
fi
|
||||||
|
|
||||||
# Fedora workaround to fix the missing unicode.pf2 file (tested on fedora 34): https://bugzilla.redhat.com/show_bug.cgi?id=1739762
|
# Fedora workaround to fix the missing unicode.pf2 file (tested on fedora 34): https://bugzilla.redhat.com/show_bug.cgi?id=1739762
|
||||||
# This occurs when we add a theme on grub2 with Fedora.
|
# This occurs when we add a theme on grub2 with Fedora.
|
||||||
@ -352,7 +354,7 @@ remove() {
|
|||||||
# Check for root access and proceed if it is present
|
# Check for root access and proceed if it is present
|
||||||
if [ "$UID" -eq "$ROOT_UID" ]; then
|
if [ "$UID" -eq "$ROOT_UID" ]; then
|
||||||
|
|
||||||
echo -e "\n Checking for the existence of themes directory..."
|
echo -e "Checking for the existence of themes directory..."
|
||||||
if [[ -d "${THEME_DIR}/${theme}" ]]; then
|
if [[ -d "${THEME_DIR}/${theme}" ]]; then
|
||||||
rm -rf "${THEME_DIR}/${theme}"
|
rm -rf "${THEME_DIR}/${theme}"
|
||||||
else
|
else
|
||||||
@ -381,6 +383,7 @@ remove() {
|
|||||||
|
|
||||||
# Backup with --in-place option to grub.bak within the same directory; then remove the current theme.
|
# Backup with --in-place option to grub.bak within the same directory; then remove the current theme.
|
||||||
sed --in-place='.bak' "s|$current_theme|#GRUB_THEME=|" "$grub_config_location"
|
sed --in-place='.bak' "s|$current_theme|#GRUB_THEME=|" "$grub_config_location"
|
||||||
|
rm -rf "$grub_config_location".bak
|
||||||
|
|
||||||
# Update grub config
|
# Update grub config
|
||||||
prompt -s "\n Resetting grub theme...\n"
|
prompt -s "\n Resetting grub theme...\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user