diff --git a/sh/main.sh b/sh/main.sh index 5274b28..2a351c9 100644 --- a/sh/main.sh +++ b/sh/main.sh @@ -12,7 +12,7 @@ SH_MAIN="${SH_ROOT}/${SH_MAIN_NAME}" SH_SHELL="$(cat "/proc/${$}/comm")" SH_USER="${HOME}/${SH_NAME}" -# functions +# private _sh_ifs_new() { SH_IFS="${IFS}" @@ -25,6 +25,21 @@ _sh_ifs_pop() { unset SH_IFS } +_sh_main_log() { + case "${-}" in + *i*) + [ ${#} -gt 0 ] || set -- "" + local line + for line in "${@}"; do + echo "${line}" + done + ;; + *) ;; + esac +} + +# + sh_source_check() { local root="${1}" local file module modules @@ -67,19 +82,6 @@ _sh_main_commands() { cut --delimiter "(" --fields 1 } -_sh_main_log() { - case "${-}" in - *i*) - [ ${#} -gt 0 ] || set -- "" - local line - for line in "${@}"; do - echo "${line}" - done - ;; - *) ;; - esac -} - main_source_directory() { local path="${1}" if [ ! -d "${path}" ]; then