log modules

This commit is contained in:
Marc Beninca 2023-05-14 23:24:40 +02:00
parent ffdc0c74e1
commit 4f043326ee
2 changed files with 2 additions and 3 deletions

View file

@ -5,7 +5,7 @@ LOG_LEVEL_INFO=3
LOG_LEVEL_DEBUG=4
LOG_LEVEL_TRACE=5
LOG_LEVEL=${LOG_LEVEL_WARNING}
LOG_LEVEL=${LOG_LEVEL_WARN}
function log_fatal { [ ${LOG_LEVEL} -ge ${LOG_LEVEL_FATAL} ] && echo "${@}" ; }

View file

@ -12,11 +12,10 @@ function link_bashrc {
function main_import_modules {
local IFS=$'\n'
local modules=($(find "${MAIN_ROOT}" -type 'f' -name '*.sh'))
log_trace "${modules[@]}"
local module
for module in "${modules[@]}" ; do
if [ "${module}" != "${MAIN_FILE}" ] ; then
echo
echo "${module}"
source "${module}"
fi
done