mirror of
https://github.com/vinceliuice/grub2-themes.git
synced 2024-12-25 19:05:35 +01:00
improve grub.bak existance check
This commit is contained in:
parent
8cd0ea9b4a
commit
4deac71ab4
12
install.sh
12
install.sh
@ -136,8 +136,16 @@ install() {
|
|||||||
prompt -i "\n Setting ${theme} as default..."
|
prompt -i "\n Setting ${theme} as default..."
|
||||||
|
|
||||||
# Backup grub config
|
# Backup grub config
|
||||||
if [[ ! -f "/etc/default/grub.bak" ]]; then
|
if [[ -f /etc/default/grub.bak ]]; then
|
||||||
cp -an /etc/default/grub /etc/default/grub.bak
|
echo -ne "\n${b_CWAR}File '/etc/default/grub.bak' already exists. Remove it? [yN]${CDEF}"
|
||||||
|
read choice
|
||||||
|
if [ "$choice" = 'y' ]; then
|
||||||
|
cp -a /etc/default/grub /etc/default/grub.bak
|
||||||
|
else
|
||||||
|
echo -ne "\n${b_CWAR}Skipping to save a backup configuration in '/etc/default/grub.bak'${CDEF}"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
cp -a /etc/default/grub /etc/default/grub.bak
|
||||||
fi
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user