From efbe50233ef47c53f796e3515ef33c016e7196b9 Mon Sep 17 00:00:00 2001 From: jnqnfe Date: Tue, 13 Jan 2015 00:26:04 +0000 Subject: [PATCH] grub1: refactor install menu creation This is necessary as the simplest solution to allow a single speech-synth entry to be added. Gbp-Dch: Short --- scripts/build/binary_grub-legacy | 51 ++++++++++---------------------- 1 file changed, 16 insertions(+), 35 deletions(-) diff --git a/scripts/build/binary_grub-legacy b/scripts/build/binary_grub-legacy index 1cc1d73b2..5f620e8f4 100755 --- a/scripts/build/binary_grub-legacy +++ b/scripts/build/binary_grub-legacy @@ -67,41 +67,16 @@ Grub_install_entry () INITRD="${3}" APPEND="${4}" - QAPPEND="--- quiet" + APPEND="${APPEND} LB_BOOTAPPEND_INSTALL" - for TYPE in Install Expert Rescue Auto - do - case "${TYPE}" in - Install) - TAPPEND="${APPEND} LB_BOOTAPPEND_INSTALL ${QAPPEND}" - ;; + if [ "${LABEL}" != "expert" ] && [ "${LABEL}" != "expertgui" ] + then + APPEND="${APPEND} --- quiet" + fi - Expert) - TAPPEND="priority=low ${APPEND} LB_BOOTAPPEND_INSTALL" - ;; - - Rescue) - TAPPEND="rescue/enable=true ${APPEND} LB_BOOTAPPEND_INSTALL ${QAPPEND}" - ;; - - Auto) - TAPPEND="auto=true priority=critical ${APPEND} LB_BOOTAPPEND_INSTALL ${QAPPEND}" - ;; - esac - - case "${LABEL}" in - Text) - TYPE_SUFFIX="" - ;; - GUI) - TYPE_SUFFIX="gui" - ;; - esac - - LINUX_INSTALL="${LINUX_INSTALL}\ntitle\t\t${LABEL} ${TYPE}" - LINUX_INSTALL="${LINUX_INSTALL}\nkernel\t\t/${KERNEL} ${TAPPEND}" - LINUX_INSTALL="${LINUX_INSTALL}\ninitrd\t\t/${INITRD}" - done + LINUX_INSTALL="${LINUX_INSTALL}\ntitle\t\tDebian GNU/Linux - ${LABEL}" + LINUX_INSTALL="${LINUX_INSTALL}\nkernel\t\t/${KERNEL} ${APPEND}" + LINUX_INSTALL="${LINUX_INSTALL}\ninitrd\t\t/${INITRD}" } if [ -e "config/bootloaders/grub-legacy" ] @@ -208,12 +183,18 @@ then if [ -f "binary/${VMLINUZ_GI}" ] && [ -f "binary/${INITRD_GI}" ] then - Grub_install_entry "GUI" "${VMLINUZ_GI}" "${INITRD_GI}" "${APPEND_GI}" + Grub_install_entry "GUI Install" "${VMLINUZ_GI}" "${INITRD_GI}" "${APPEND_GI}" + Grub_install_entry "GUI Expert" "${VMLINUZ_GI}" "${INITRD_GI}" "priority=low ${APPEND_GI}" + Grub_install_entry "GUI Rescue" "${VMLINUZ_GI}" "${INITRD_GI}" "rescue/enable=true ${APPEND_GI}" + Grub_install_entry "GUI Auto" "${VMLINUZ_GI}" "${INITRD_GI}" "auto=true priority=critical ${APPEND_GI}" fi if [ -f "binary/${VMLINUZ_DI}" ] && [ -f "binary/${INITRD_DI}" ] then - Grub_install_entry "Text" "${VMLINUZ_DI}" "${INITRD_DI}" "${APPEND_DI}" + Grub_install_entry "Text Install" "${VMLINUZ_DI}" "${INITRD_DI}" "${APPEND_DI}" + Grub_install_entry "Text Expert" "${VMLINUZ_DI}" "${INITRD_DI}" "priority=low ${APPEND_DI}" + Grub_install_entry "Text Rescue" "${VMLINUZ_DI}" "${INITRD_DI}" "rescue/enable=true ${APPEND_DI}" + Grub_install_entry "Text Auto" "${VMLINUZ_DI}" "${INITRD_DI}" "auto=true priority=critical ${APPEND_DI}" fi fi