From 9dc75bda9eb14e8714e7bc63de4c92a5a90fb7ca Mon Sep 17 00:00:00 2001 From: Chris Hofstaedtler Date: Tue, 26 Nov 2024 14:55:23 +0100 Subject: [PATCH] remaster: fix quoting issues found by shellcheck --- remaster/grml-live-remaster | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/remaster/grml-live-remaster b/remaster/grml-live-remaster index 410bf323..ee49d0d4 100755 --- a/remaster/grml-live-remaster +++ b/remaster/grml-live-remaster @@ -34,7 +34,9 @@ if ! [ -r /etc/grml/lsb-functions ] || ! [ -r /etc/grml/script-functions ] ; the exit 1 fi +# shellcheck source=/dev/null . /etc/grml/lsb-functions +# shellcheck source=/dev/null . /etc/grml/script-functions # }}} @@ -117,9 +119,9 @@ ${GRML_LIVE_EDITOR} /remaster/msg [ -d /remaster/iso ] || mkdir /remaster/iso -for i in ${LIVE_PATH_MAIN}/*; do - if [ ! $i = ${LIVE_PATH_MAIN}/live ]; then - cp -R $i /remaster/iso +for i in "${LIVE_PATH_MAIN}"/*; do + if [ ! "$i" = ${LIVE_PATH_MAIN}/live ]; then + cp -R "$i" /remaster/iso fi done @@ -140,11 +142,11 @@ sed 3,4d "${BOOTSTUFF}"/boot.msg \ >/remaster/iso/boot/isolinux/boot.msg sed 1,2d /remaster/msg >>/remaster/iso/boot/isolinux/boot.msg -SQUASHFS_FQNAME=/remaster/iso/${SQUASHFS_FILE##$LIVE_PATH_MAIN} -mkdir -p $(dirname $SQUASHFS_FQNAME) +SQUASHFS_FQNAME=/remaster/iso/${SQUASHFS_FILE##"$LIVE_PATH_MAIN"} +mkdir -p "$(dirname "$SQUASHFS_FQNAME")" # the next line is necessary for grml2usb to work on the destination image -echo $(basename $SQUASHFS_FQNAME) > $(dirname $SQUASHFS_FQNAME)/filesystem.module -$MKSQUASHFS /remaster/chroot $SQUASHFS_FQNAME +basename "$SQUASHFS_FQNAME" > "$(dirname "$SQUASHFS_FQNAME")/filesystem.module" +$MKSQUASHFS /remaster/chroot "$SQUASHFS_FQNAME" umount /remaster/chroot /remaster/cdrom if [ -f /remaster/iso/boot/isolinux/isolinux.bin ] ; then