if interactive

This commit is contained in:
Marc Beninca 2024-11-29 12:01:01 +01:00
parent eee9e38b7d
commit 1572a779ae
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

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