Compare commits

...

5 commits

Author SHA1 Message Date
00005aa03d
code/relay
All checks were successful
/ job (push) Successful in 2m55s
2025-07-09 05:25:01 +02:00
09bf59c3ba
module/main
All checks were successful
/ job (push) Successful in 2m54s
2025-07-09 05:15:32 +02:00
63c48f7de9
source/root,main 2025-07-09 05:14:21 +02:00
032568b822
source/main 2025-07-09 05:12:32 +02:00
d0d0f0c21d
−count 2025-07-09 04:57:58 +02:00
2 changed files with 12 additions and 11 deletions

View file

@ -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

View file

@ -79,17 +79,15 @@ _rwx_main_log() {
# source code from root path
rwx_main_source() {
local root="${1}"
local main="${2}"
[ -d "${root}" ] ||
return 1
local count module modules
count=0
_rwx_main_log "" \
". ${root}"
local module modules
# cache main
[ -n "${main}" ] && rwx_main_cache "${root}" "${main}"
modules="$(rwx_main_find "${root}")"
while IFS= read -r module; do
if [ "${module}" != "${RWX_MAIN_NAME}" ]; then
count=$((count + 1))
_rwx_main_log "$(printf "%02d" "${count}") ${module}"
if [ "${module}" != "${main}" ]; then
# shellcheck disable=SC1090
. "${root}/${module}.${RWX_MAIN_EXTENSION}"
# cache code
@ -127,15 +125,15 @@ ${text}
# run initial steps
#< core/code
rwx_main_main() {
# cache main
rwx_main_cache "${RWX_ROOT_SYSTEM}" "${RWX_MAIN_NAME}"
local code
# source system root
if ! rwx_main_source "${RWX_ROOT_SYSTEM}"; then
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