This commit is contained in:
Marc Beninca 2024-11-13 12:50:49 +01:00
parent 2a568eeb22
commit 458e4b60f6
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -19,11 +19,13 @@ main_import_modules() {
local ifs module modules path root local ifs module modules path root
path="$(realpath --canonicalize-existing "${file}")" path="$(realpath --canonicalize-existing "${file}")"
root="$(dirname "${path}")" root="$(dirname "${path}")"
modules="$(find "${root}" -type "f" -name "*.sh" | sort)" modules="$(find "${root}" -type "f" -name "*.sh" -printf "%P
" | sort)"
ifs="${IFS}" ifs="${IFS}"
IFS=" IFS="
" "
for module in ${modules}; do for module in ${modules}; do
module="${root}/${module}"
if [ "${module}" != "${path}" ]; then if [ "${module}" != "${path}" ]; then
. "${module}" . "${module}"
fi fi