diff --git a/sh/main.sh b/sh/main.sh index 692664a..4c99298 100644 --- a/sh/main.sh +++ b/sh/main.sh @@ -26,16 +26,13 @@ _sh_ifs_pop() { } _sh_main_log() { - case "${-}" in - *i*) + if sh_shell_interactive; then [ ${#} -gt 0 ] || set -- "" local line for line in "${@}"; do echo "${line}" done - ;; - *) ;; - esac + fi } # public @@ -115,10 +112,12 @@ sh_main() { return 1 fi sh_source_directory "${SH_USER}" - sh_log - sh_shellcheck "${SH_ROOT}" - sh_log - sh_help + if sh_shell_interactive; then + sh_log + sh_shellcheck "${SH_ROOT}" + sh_log + sh_help + fi } sh_main