From 95d852c9944a8d448079d5199c21e55e181de99f Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Thu, 2 May 2024 15:18:45 +0200 Subject: [PATCH] build-system: implementation of debug() function simplefied --- Pmodules/modbuild.in | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/Pmodules/modbuild.in b/Pmodules/modbuild.in index 85031d3..ca8a785 100755 --- a/Pmodules/modbuild.in +++ b/Pmodules/modbuild.in @@ -193,6 +193,7 @@ declare -- BUILD_SCRIPT='' declare -- yaml_config_file='' declare -a legacy_config_files=() declare -- module_name='' +declare -- echo=':' parse_args() { # @@ -221,6 +222,7 @@ parse_args() { ;; --debug ) opt_debug='yes' + echo='echo' ;; -f | --force-rebuild ) opt_force_rebuild='yes' @@ -1386,21 +1388,14 @@ build_modules() { fi } +debug(){ + ${echo} "DEBUG: " "$@" +} + #............................................................................. # main parse_args "$@" - -if [[ "${opt_debug,,}" == 'no' ]]; then - debug(){ - : - } -else - debug(){ - echo "DEBUG: " "$@" - } -fi - pbuild.jobs "${opt_jobs}" pbuild.force_rebuild "${opt_force_rebuild}" pbuild.build_target "${opt_build_target}"