path,root

This commit is contained in:
Marc Beninca 2024-11-13 11:57:56 +01:00
parent 7398fa0726
commit 28330ca3c8
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -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