From be7d8517acdd45a6f66a0e99c86fec6a2a412b65 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Fri, 17 Nov 2023 16:06:57 +0100 Subject: [PATCH] modulecmd: store field-names in YAML module config in lowercase --- Pmodules/modulecmd.bash.in | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index 80dbec6..04cac2a 100644 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -329,7 +329,7 @@ get_module_config(){ ;; esac if [[ "${value}" != 'null' ]]; then - ref_cfg[${key}]="${value}" + ref_cfg[${key,,}]="${value}" fi done return 0 @@ -3392,6 +3392,10 @@ case "$1" in esac shift +debug(){ + : +} + # parse agruments till and including the sub-command declare -a opts=() while (( $# > 0 )); do @@ -3403,6 +3407,11 @@ while (( $# > 0 )); do print_help 'version' ;; --debug ) + debug(){ + echo "DEBUG: " "$@" 1>&2 + } + ;; + --verbose ) set -x ;; '' )