source/main
This commit is contained in:
parent
d0d0f0c21d
commit
032568b822
1 changed files with 4 additions and 5 deletions
|
@ -79,11 +79,12 @@ _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 module modules
|
||||||
_rwx_main_log "" \
|
# cache main
|
||||||
". ${root}"
|
[ -n "${main}" ] && rwx_main_cache "${RWX_ROOT_SYSTEM}" "${RWX_MAIN_NAME}"
|
||||||
modules="$(rwx_main_find "${root}")"
|
modules="$(rwx_main_find "${root}")"
|
||||||
while IFS= read -r module; do
|
while IFS= read -r module; do
|
||||||
if [ "${module}" != "${RWX_MAIN_NAME}" ]; then
|
if [ "${module}" != "${RWX_MAIN_NAME}" ]; then
|
||||||
|
@ -124,10 +125,8 @@ ${text}
|
||||||
# run initial steps
|
# run initial steps
|
||||||
#< core/code
|
#< core/code
|
||||||
rwx_main_main() {
|
rwx_main_main() {
|
||||||
# cache main
|
|
||||||
rwx_main_cache "${RWX_ROOT_SYSTEM}" "${RWX_MAIN_NAME}"
|
|
||||||
# source system root
|
# 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}"
|
_rwx_main_log "Not a directory: ${RWX_ROOT_SYSTEM}"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue