From 8fb0750b596bfbb30cd5033bc10abd68307da276 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 25 Nov 2024 15:07:19 +0100 Subject: [PATCH] except --- sh/main.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/sh/main.sh b/sh/main.sh index d593295..7b3fe28 100644 --- a/sh/main.sh +++ b/sh/main.sh @@ -62,7 +62,7 @@ main_source_directory() { local path="${1}" if [ -d "${path}" ]; then local cmd count ifs module modules - modules="$(sh_source_find "${path}")" + modules="$(sh_source_find "${path}" "main.sh")" ifs="${IFS}" IFS=" " @@ -74,15 +74,13 @@ main_source_directory() { #printf "%02d" "${count}" _sh_main_log "${module%.sh}" module="${path}/${module}" - if [ "${module}" != "${ENV}" ]; then - # shellcheck disable=SC1090 - . "${module}" - cmd="$(_sh_main_commands "${module}")" - if [ -n "${cmd}" ]; then - [ -n "${CMD}" ] && CMD="${CMD} + # shellcheck disable=SC1090 + . "${module}" + cmd="$(_sh_main_commands "${module}")" + if [ -n "${cmd}" ]; then + [ -n "${CMD}" ] && CMD="${CMD} " - CMD="${CMD}${cmd}" - fi + CMD="${CMD}${cmd}" fi done IFS="${ifs}"