Don't duplicate gtk and non-gtk kernels if they are identical.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
This commit is contained in:
Chris Lamb 2008-07-29 00:48:31 +01:00
parent 2435bee4ac
commit 3199a409fa
2 changed files with 14 additions and 0 deletions

View File

@ -226,6 +226,13 @@ then
INITRD_GI="install/gtk/initrd.gz"
APPEND_GI="video=vesa:ywrap,mtrr vga=788"
if cmp -s ${VMLINUZ_DI} ${VMLINUZ_GI}
then
# Kernels are identical; we can save space by removing one of them.
rm ${VMLINUZ_GI}
VMLINUZ_GI="${VMLINUZ_DI}"
fi
Grub_install_entry "install" "${VMLINUZ_DI}" "${INITRD_DI}" "${APPEND_DI}"
Grub_install_entry "installgui" "${VMLINUZ_GI}" "${INITRD_GI}" "${APPEND_GI}"
Grub_install_entry "expert" "${VMLINUZ_DI}" "${INITRD_DI}" "priority=low ${APPEND_DI}"

View File

@ -522,6 +522,13 @@ then
INITRD_GI="gtk/initrd.gz"
APPEND_GI="video=vesa:ywrap,mtrr vga=788"
if cmp -s ${VMLINUZ_DI} ${VMLINUZ_GI}
then
# Kernels are identical; we can save space by removing one of them.
rm ${VMLINUZ_GI}
VMLINUZ_GI="${VMLINUZ_DI}"
fi
Syslinux_install_entry "Text" "${VMLINUZ_DI}" "${INITRD_DI}" "${APPEND_DI}"
Syslinux_install_entry "GUI" "${VMLINUZ_GI}" "${INITRD_GI}" "${APPEND_GI}"
fi