main/shell

This commit is contained in:
Marc Beninca 2024-12-01 19:40:52 +01:00
parent 52a43b0e60
commit d94880bb75
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -114,25 +114,33 @@ rwx_source() {
# run initial steps # run initial steps
rwx_main() { rwx_main() {
# system root case "${RWX_SHELL}" in
if ! rwx_source "${RWX_ROOT_SYSTEM}"; then "sh" | \
__rwx_log "Not a directory: ${RWX_ROOT_SYSTEM}" "bash")
return 1 # system root
fi if ! rwx_source "${RWX_ROOT_SYSTEM}"; then
# user root __rwx_log "Not a directory: ${RWX_ROOT_SYSTEM}"
rwx_source "${RWX_ROOT_USER}" return 1
# run interactive extras fi
if rwx_shell_interactive; then # user root
# check format rwx_source "${RWX_ROOT_USER}"
rwx_log # run interactive extras
rwx_shfmt "${RWX_ROOT_SYSTEM}" if rwx_shell_interactive; then
# check syntax # check format
rwx_log rwx_log
rwx_shellcheck "${RWX_ROOT_SYSTEM}" rwx_shfmt "${RWX_ROOT_SYSTEM}"
# help # check syntax
rwx_log rwx_log
rwx_self_help rwx_shellcheck "${RWX_ROOT_SYSTEM}"
fi # help
rwx_log
rwx_self_help
fi
;;
*)
echo
;;
esac
} }
# run main function # run main function