From 65d7a3fc34a0e84dbe56f8db6ef5d4b1182d0f22 Mon Sep 17 00:00:00 2001 From: Chris Hofstaedtler Date: Tue, 26 Nov 2024 14:39:24 +0100 Subject: [PATCH] grml-live: write grmlmain.cfg in one go --- grml-live | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/grml-live b/grml-live index 52d7ee15..4852f70e 100755 --- a/grml-live +++ b/grml-live @@ -1347,21 +1347,23 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] || [ "$ARCH" = arm64 ] ; then if ! [ -r "${BUILD_OUTPUT}/boot/isolinux/${DISTRI_NAME}.cfg" ] || [ "$DISTRI_NAME" = "grml" ] ; then log "including grmlmain.cfg in ${BUILD_OUTPUT}/boot/isolinux/distri.cfg" echo "include grmlmain.cfg" > "${BUILD_OUTPUT}/boot/isolinux/distri.cfg" - echo "include default.cfg" > "${BUILD_OUTPUT}/boot/isolinux/grmlmain.cfg" - echo "include menuoptions.cfg" >> "${BUILD_OUTPUT}/boot/isolinux/grmlmain.cfg" - echo "include grml.cfg" >> "${BUILD_OUTPUT}/boot/isolinux/grmlmain.cfg" - for f in "${BUILD_OUTPUT}"/boot/isolinux/submenu*.cfg ; do - echo "include $(basename "$f")" >> "${BUILD_OUTPUT}/boot/isolinux/grmlmain.cfg" - done - - echo "include options.cfg" >> "${BUILD_OUTPUT}/boot/isolinux/grmlmain.cfg" - if [ -z "$NO_ADDONS" ] ; then - echo "include addons.cfg" >> "${BUILD_OUTPUT}/boot/isolinux/grmlmain.cfg" - fi - echo "include isoprompt.cfg" >> "${BUILD_OUTPUT}/boot/isolinux/grmlmain.cfg" - echo "include hd.cfg" >> "${BUILD_OUTPUT}/boot/isolinux/grmlmain.cfg" - echo "include hidden.cfg" >> "${BUILD_OUTPUT}/boot/isolinux/grmlmain.cfg" + # Generate grmlmain.cfg + { + echo "include default.cfg" + echo "include menuoptions.cfg" + echo "include grml.cfg" + for f in "${BUILD_OUTPUT}"/boot/isolinux/submenu*.cfg ; do + echo "include $(basename "$f")" + done + echo "include options.cfg" + if [ -z "$NO_ADDONS" ] ; then + echo "include addons.cfg" + fi + echo "include isoprompt.cfg" + echo "include hd.cfg" + echo "include hidden.cfg" + } > "${BUILD_OUTPUT}/boot/isolinux/grmlmain.cfg" else # assume we are building a custom distribution: log "File ${BUILD_OUTPUT}/boot/isolinux/${DISTRI_NAME}.cfg found, using it." einfo "File ${BUILD_OUTPUT}/boot/isolinux/${DISTRI_NAME}.cfg found, using it."