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