diff --git a/sh/log/log.sh b/sh/log/log.sh index a3013e8..f5e13b1 100644 --- a/sh/log/log.sh +++ b/sh/log/log.sh @@ -76,9 +76,9 @@ _rwx_log() { local line for line in "${@}"; do if [ -n "${prefix}" ]; then - __rwx_log "${prefix} ${line}" + _rwx_main_log "${prefix} ${line}" else - __rwx_log "${line}" + _rwx_main_log "${line}" fi done } diff --git a/sh/main.sh b/sh/main.sh index be954c5..afae042 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -69,7 +69,7 @@ rwx_shell_interactive() { # │ main │ log │ # ╰──────┴─────╯ -__rwx_log() { +_rwx_main_log() { if rwx_shell_interactive; then [ ${#} -gt 0 ] || set -- "" local line @@ -91,12 +91,12 @@ rwx_source() { local file="${2}" local count module modules count=0 - __rwx_log "" \ + _rwx_main_log "" \ ". ${root}" modules="$(rwx_find_shell "${root}" "${file}")" while IFS= read -r module; do count=$((count + 1)) - __rwx_log "$(printf "%02d" "${count}") ${module%.sh}" + _rwx_main_log "$(printf "%02d" "${count}") ${module%.sh}" # shellcheck disable=SC1090 . "${root}/${module}" # cache code @@ -133,21 +133,17 @@ ${text} # run initial steps #< code -rwx_main() { +rwx_main_main() { # cache main rwx_cache "${RWX_ROOT_SYSTEM}" "${RWX_MAIN_NAME}" # source system root if ! rwx_source "${RWX_ROOT_SYSTEM}" "${RWX_MAIN_NAME}"; then - __rwx_log "Not a directory: ${RWX_ROOT_SYSTEM}" + _rwx_main_log "Not a directory: ${RWX_ROOT_SYSTEM}" return 1 fi # run code main function rwx_code_main } -# ╭──────┬─────╮ -# │ main │ run │ -# ╰──────┴─────╯ - # run main function -rwx_main "${@}" +rwx_main_main "${@}"