From 28330ca3c8886b77e15d98450480a058da3d1b19 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 13 Nov 2024 11:57:56 +0100 Subject: [PATCH] path,root --- bash/main.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bash/main.sh b/bash/main.sh index bbfcc87..c12cdf8 100644 --- a/bash/main.sh +++ b/bash/main.sh @@ -14,8 +14,10 @@ main_link_bashrc() { main_import_modules() { local file="${1}" if [ -f "${file}" ]; then - local path="$(realpath "${file}")" - local root="$(dirname "${path}")" + local path + local root + path="$(realpath "${file}")" + root="$(dirname "${path}")" local IFS=$'\n' local modules=($(find "${root}" -type "f" -name "*.sh" | sort)) local module