From 032568b82267fe953ece16d3e895fdc193a444c3 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 9 Jul 2025 05:12:32 +0200 Subject: [PATCH] source/main --- sh/main.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sh/main.sh b/sh/main.sh index ebd8849..ed2949a 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -79,11 +79,12 @@ _rwx_main_log() { # source code from root path rwx_main_source() { local root="${1}" + local main="${2}" [ -d "${root}" ] || return 1 local module modules - _rwx_main_log "" \ - ". ${root}" + # cache main + [ -n "${main}" ] && rwx_main_cache "${RWX_ROOT_SYSTEM}" "${RWX_MAIN_NAME}" modules="$(rwx_main_find "${root}")" while IFS= read -r module; do if [ "${module}" != "${RWX_MAIN_NAME}" ]; then @@ -124,10 +125,8 @@ ${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}"; then + if ! rwx_main_source "${RWX_ROOT_SYSTEM}" "${RWX_MAIN_NAME}"; then _rwx_main_log "Not a directory: ${RWX_ROOT_SYSTEM}" return 1 fi