shfmt
This commit is contained in:
parent
e8c65c9821
commit
0cc06b6de0
1 changed files with 3 additions and 3 deletions
|
@ -13,14 +13,14 @@ main_link_bashrc() {
|
||||||
# import modules
|
# import modules
|
||||||
main_import_modules() {
|
main_import_modules() {
|
||||||
local file="${1}"
|
local file="${1}"
|
||||||
if [ -f "${file}" ] ; then
|
if [ -f "${file}" ]; then
|
||||||
local path="$(realpath "${file}")"
|
local path="$(realpath "${file}")"
|
||||||
local root="$(dirname "${path}")"
|
local root="$(dirname "${path}")"
|
||||||
local IFS=$'\n'
|
local IFS=$'\n'
|
||||||
local modules=($(find "${root}" -type "f" -name "*.sh" | sort))
|
local modules=($(find "${root}" -type "f" -name "*.sh" | sort))
|
||||||
local module
|
local module
|
||||||
for module in "${modules[@]}" ; do
|
for module in "${modules[@]}"; do
|
||||||
if [ "${module}" != "${path}" ] ; then
|
if [ "${module}" != "${path}" ]; then
|
||||||
. "${module}"
|
. "${module}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue