From d0d0f0c21d84f38cea7ad419fd08650d62889982 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 9 Jul 2025 04:57:58 +0200 Subject: [PATCH 1/4] =?UTF-8?q?=E2=88=92count?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/main.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sh/main.sh b/sh/main.sh index 401fccd..ebd8849 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -81,15 +81,12 @@ rwx_main_source() { local root="${1}" [ -d "${root}" ] || return 1 - local count module modules - count=0 + local module modules _rwx_main_log "" \ ". ${root}" 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}" # shellcheck disable=SC1090 . "${root}/${module}.${RWX_MAIN_EXTENSION}" # cache code From 032568b82267fe953ece16d3e895fdc193a444c3 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 9 Jul 2025 05:12:32 +0200 Subject: [PATCH 2/4] 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 From 63c48f7de916e6b7ae8c9ae5ac4a7aa0564142ad Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 9 Jul 2025 05:14:21 +0200 Subject: [PATCH 3/4] source/root,main --- sh/main.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/main.sh b/sh/main.sh index ed2949a..682605e 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -84,7 +84,7 @@ rwx_main_source() { return 1 local module modules # cache main - [ -n "${main}" ] && rwx_main_cache "${RWX_ROOT_SYSTEM}" "${RWX_MAIN_NAME}" + [ -n "${main}" ] && rwx_main_cache "${root}" "${main}" modules="$(rwx_main_find "${root}")" while IFS= read -r module; do if [ "${module}" != "${RWX_MAIN_NAME}" ]; then From 09bf59c3ba1e377a724ff03e69b9af1ab07e6b9d Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 9 Jul 2025 05:15:32 +0200 Subject: [PATCH 4/4] module/main --- sh/main.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/main.sh b/sh/main.sh index 682605e..bb5b3bb 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -87,7 +87,7 @@ rwx_main_source() { [ -n "${main}" ] && rwx_main_cache "${root}" "${main}" modules="$(rwx_main_find "${root}")" while IFS= read -r module; do - if [ "${module}" != "${RWX_MAIN_NAME}" ]; then + if [ "${module}" != "${main}" ]; then # shellcheck disable=SC1090 . "${root}/${module}.${RWX_MAIN_EXTENSION}" # cache code