Compare commits
No commits in common. "09bf59c3ba1e377a724ff03e69b9af1ab07e6b9d" and "99de96a3934912b980a479e2feab2f062a8e52fb" have entirely different histories.
09bf59c3ba
...
99de96a393
1 changed files with 10 additions and 6 deletions
16
sh/main.sh
16
sh/main.sh
|
@ -79,15 +79,17 @@ _rwx_main_log() {
|
|||
# source code from root path
|
||||
rwx_main_source() {
|
||||
local root="${1}"
|
||||
local main="${2}"
|
||||
[ -d "${root}" ] ||
|
||||
return 1
|
||||
local module modules
|
||||
# cache main
|
||||
[ -n "${main}" ] && rwx_main_cache "${root}" "${main}"
|
||||
local count module modules
|
||||
count=0
|
||||
_rwx_main_log "" \
|
||||
". ${root}"
|
||||
modules="$(rwx_main_find "${root}")"
|
||||
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
|
||||
. "${root}/${module}.${RWX_MAIN_EXTENSION}"
|
||||
# cache code
|
||||
|
@ -125,8 +127,10 @@ ${text}
|
|||
# run initial steps
|
||||
#< core/code
|
||||
rwx_main_main() {
|
||||
# cache main
|
||||
rwx_main_cache "${RWX_ROOT_SYSTEM}" "${RWX_MAIN_NAME}"
|
||||
# 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}"
|
||||
return 1
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue