From 561ba2537793de4dfa33f2c1a926e567e20fc2f7 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Mon, 3 Jul 2023 18:21:16 +0200 Subject: [PATCH] modubuild: bugfix in handling of commments in legacy config files --- Pmodules/modbuild.in | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Pmodules/modbuild.in b/Pmodules/modbuild.in index dfbb6b5..7ab4898 100755 --- a/Pmodules/modbuild.in +++ b/Pmodules/modbuild.in @@ -7,8 +7,6 @@ # #............................................................................. -set -x - declare VERSION='@PMODULES_VERSION@' # get absolute path of script @@ -428,8 +426,8 @@ build_modules_legacy() { local -a toks=() while read -a toks; do # skip empty and comment lines - [[ -z ${toks} ]] && continue - [[ ${toks:0:1} == '#' ]] && continue + (( ${#toks[@]} == 0 )) && continue + [[ ${toks[0]:0:1} == '#' ]] && continue local -a deps=( ${toks[*]:2} ) bash_expand "${toks[0]} ${toks[1]}" "${deps[@]}" done < "${input}"