modules
This commit is contained in:
parent
6818171cbc
commit
5433ef186a
1 changed files with 8 additions and 2 deletions
10
bash/main.sh
10
bash/main.sh
|
@ -8,13 +8,19 @@ function link_bashrc {
|
||||||
ln --symbolic "${MAIN_FILE}" "${file}"
|
ln --symbolic "${MAIN_FILE}" "${file}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# import modules
|
||||||
function main_import_modules {
|
function main_import_modules {
|
||||||
local module
|
local IFS=$'\n'
|
||||||
for module in "${MAIN_ROOT}"/*.sh ; do
|
local modules=($(find "${MAIN_ROOT}" -type 'f' -name '*.sh'))
|
||||||
|
local module
|
||||||
|
for module in "${modules[@]}" ; do
|
||||||
if [ "${module}" != "${MAIN_FILE}" ] ; then
|
if [ "${module}" != "${MAIN_FILE}" ] ; then
|
||||||
|
echo
|
||||||
|
echo "${module}"
|
||||||
source "${module}"
|
source "${module}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# import modules
|
||||||
main_import_modules
|
main_import_modules
|
||||||
|
|
Loading…
Reference in a new issue