Compare commits
No commits in common. "00005aa03d4b4b904529c263e55b4edad923ddb2" and "99de96a3934912b980a479e2feab2f062a8e52fb" have entirely different histories.
00005aa03d
...
99de96a393
2 changed files with 11 additions and 12 deletions
|
@ -223,9 +223,6 @@ rwx_code_parse() {
|
||||||
# ╰──────┴──────╯
|
# ╰──────┴──────╯
|
||||||
|
|
||||||
rwx_code_main() {
|
rwx_code_main() {
|
||||||
local code="${1}"
|
|
||||||
shift
|
|
||||||
_rwx_code="${code}"
|
|
||||||
# source user root
|
# source user root
|
||||||
rwx_main_source "${RWX_SELF_USER}"
|
rwx_main_source "${RWX_SELF_USER}"
|
||||||
# load code cache
|
# load code cache
|
||||||
|
|
20
sh/main.sh
20
sh/main.sh
|
@ -79,15 +79,17 @@ _rwx_main_log() {
|
||||||
# source code from root path
|
# source code from root path
|
||||||
rwx_main_source() {
|
rwx_main_source() {
|
||||||
local root="${1}"
|
local root="${1}"
|
||||||
local main="${2}"
|
|
||||||
[ -d "${root}" ] ||
|
[ -d "${root}" ] ||
|
||||||
return 1
|
return 1
|
||||||
local module modules
|
local count module modules
|
||||||
# cache main
|
count=0
|
||||||
[ -n "${main}" ] && rwx_main_cache "${root}" "${main}"
|
_rwx_main_log "" \
|
||||||
|
". ${root}"
|
||||||
modules="$(rwx_main_find "${root}")"
|
modules="$(rwx_main_find "${root}")"
|
||||||
while IFS= read -r module; do
|
while IFS= read -r module; do
|
||||||
if [ "${module}" != "${main}" ]; then
|
if [ "${module}" != "${RWX_MAIN_NAME}" ]; then
|
||||||
|
count=$((count + 1))
|
||||||
|
_rwx_main_log "$(printf "%02d" "${count}") ${module}"
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
. "${root}/${module}.${RWX_MAIN_EXTENSION}"
|
. "${root}/${module}.${RWX_MAIN_EXTENSION}"
|
||||||
# cache code
|
# cache code
|
||||||
|
@ -125,15 +127,15 @@ ${text}
|
||||||
# run initial steps
|
# run initial steps
|
||||||
#< core/code
|
#< core/code
|
||||||
rwx_main_main() {
|
rwx_main_main() {
|
||||||
local code
|
# cache main
|
||||||
|
rwx_main_cache "${RWX_ROOT_SYSTEM}" "${RWX_MAIN_NAME}"
|
||||||
# source system root
|
# source system root
|
||||||
if ! rwx_main_source "${RWX_ROOT_SYSTEM}" "${RWX_MAIN_NAME}"; then
|
if ! rwx_main_source "${RWX_ROOT_SYSTEM}"; then
|
||||||
_rwx_main_log "Not a directory: ${RWX_ROOT_SYSTEM}"
|
_rwx_main_log "Not a directory: ${RWX_ROOT_SYSTEM}"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
code="${_rwx_code}"
|
|
||||||
# run code main function
|
# run code main function
|
||||||
rwx_code_main "${code}" "${@}"
|
rwx_code_main "${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# run main function
|
# run main function
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue