diff --git a/sh/core/code.sh b/sh/core/code.sh index a4a5eb0..39675ca 100644 --- a/sh/core/code.sh +++ b/sh/core/code.sh @@ -223,6 +223,9 @@ rwx_code_parse() { # ╰──────┴──────╯ rwx_code_main() { + local code="${1}" + shift + _rwx_code="${code}" # source user root rwx_main_source "${RWX_SELF_USER}" # load code cache diff --git a/sh/main.sh b/sh/main.sh index bb5b3bb..288b2f8 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -125,13 +125,15 @@ ${text} # run initial steps #< core/code rwx_main_main() { + local code # source system root if ! rwx_main_source "${RWX_ROOT_SYSTEM}" "${RWX_MAIN_NAME}"; then _rwx_main_log "Not a directory: ${RWX_ROOT_SYSTEM}" return 1 fi + code="${_rwx_code}" # run code main function - rwx_code_main "${@}" + rwx_code_main "${code}" "${@}" } # run main function