From 458e4b60f6ada50582b7011d63dd0aacd72ea1e1 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 13 Nov 2024 12:50:49 +0100 Subject: [PATCH] relative --- bash/main.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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