This commit is contained in:
Marc Beninca 2024-11-25 15:07:19 +01:00
parent 51de08aaa3
commit 8fb0750b59
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -62,7 +62,7 @@ main_source_directory() {
local path="${1}" local path="${1}"
if [ -d "${path}" ]; then if [ -d "${path}" ]; then
local cmd count ifs module modules local cmd count ifs module modules
modules="$(sh_source_find "${path}")" modules="$(sh_source_find "${path}" "main.sh")"
ifs="${IFS}" ifs="${IFS}"
IFS=" IFS="
" "
@ -74,15 +74,13 @@ main_source_directory() {
#printf "%02d" "${count}" #printf "%02d" "${count}"
_sh_main_log "${module%.sh}" _sh_main_log "${module%.sh}"
module="${path}/${module}" module="${path}/${module}"
if [ "${module}" != "${ENV}" ]; then # shellcheck disable=SC1090
# shellcheck disable=SC1090 . "${module}"
. "${module}" cmd="$(_sh_main_commands "${module}")"
cmd="$(_sh_main_commands "${module}")" if [ -n "${cmd}" ]; then
if [ -n "${cmd}" ]; then [ -n "${CMD}" ] && CMD="${CMD}
[ -n "${CMD}" ] && CMD="${CMD}
" "
CMD="${CMD}${cmd}" CMD="${CMD}${cmd}"
fi
fi fi
done done
IFS="${ifs}" IFS="${ifs}"