unindent
This commit is contained in:
parent
527b2d2a67
commit
b85e5768a8
1 changed files with 22 additions and 22 deletions
44
sh/main.sh
44
sh/main.sh
|
@ -122,29 +122,29 @@ rwx_source() {
|
||||||
|
|
||||||
# run initial steps
|
# run initial steps
|
||||||
rwx_main() {
|
rwx_main() {
|
||||||
|
# system root
|
||||||
|
if ! rwx_source "${RWX_ROOT_SYSTEM}"; then
|
||||||
|
__rwx_log "Not a directory: ${RWX_ROOT_SYSTEM}"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
# user root
|
||||||
|
rwx_source "$(rwx_self_user)"
|
||||||
|
# run interactive extras
|
||||||
|
if rwx_shell_interactive; then
|
||||||
|
# check format
|
||||||
|
rwx_log
|
||||||
|
rwx_shfmt "${RWX_ROOT_SYSTEM}"
|
||||||
|
# check syntax
|
||||||
|
rwx_log
|
||||||
|
rwx_shellcheck "${RWX_ROOT_SYSTEM}"
|
||||||
|
# help
|
||||||
|
rwx_log
|
||||||
|
rwx_self_help
|
||||||
|
fi
|
||||||
case "$(rwx_shell)" in
|
case "$(rwx_shell)" in
|
||||||
"sh" | \
|
"bash" | \
|
||||||
"bash")
|
"dash" | \
|
||||||
# system root
|
"sh") ;;
|
||||||
if ! rwx_source "${RWX_ROOT_SYSTEM}"; then
|
|
||||||
__rwx_log "Not a directory: ${RWX_ROOT_SYSTEM}"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
# user root
|
|
||||||
rwx_source "$(rwx_self_user)"
|
|
||||||
# run interactive extras
|
|
||||||
if rwx_shell_interactive; then
|
|
||||||
# check format
|
|
||||||
rwx_log
|
|
||||||
rwx_shfmt "${RWX_ROOT_SYSTEM}"
|
|
||||||
# check syntax
|
|
||||||
rwx_log
|
|
||||||
rwx_shellcheck "${RWX_ROOT_SYSTEM}"
|
|
||||||
# help
|
|
||||||
rwx_log
|
|
||||||
rwx_self_help
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
local argument="${0}"
|
local argument="${0}"
|
||||||
local name
|
local name
|
||||||
|
|
Loading…
Add table
Reference in a new issue