From 7a8915682d3333a6a04215669346ae87bd9d355c Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 9 Jul 2025 23:12:57 +0200 Subject: [PATCH] main/comments --- sh/main.sh | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/sh/main.sh b/sh/main.sh index 856240f..2039ba5 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -7,27 +7,27 @@ # │ main │ constants │ # ╰──────┴───────────╯ -# parent directory for the project +# project parent directory RWX_MAIN_PARENT="/usr/local/lib" -# name of the project itself +# project name RWX_MAIN_NAME="rwx" -# name of the entrypoint module +# project entrypoint module RWX_MAIN_MODULE="main" -# extension of shell modules +# shell modules extension RWX_MAIN_EXTENSION="sh" # ╭──────┬───────────╮ # │ main │ variables │ # ╰──────┴───────────╯ -# system root directory of the project +# project main root directory rwx_main_root="${RWX_MAIN_PARENT}/${RWX_MAIN_NAME}" # ╭──────┬──────╮ # │ main │ find │ # ╰──────┴──────╯ -# find directory’s shell files +# find root directory shell modules #| find #| sed #| sort @@ -46,13 +46,16 @@ rwx_main_find() { # │ main │ main │ # ╰──────┴──────╯ -# run initial steps +# run required initial steps #< core/code rwx_main_main() { - local module modules - # find & source modules + local module + local modules + # find main modules modules="$(rwx_main_find "${rwx_main_root}")" + # source main modules while IFS= read -r module; do + # except currently running main module if [ "${module}" != "${RWX_MAIN_MODULE}" ]; then # shellcheck disable=SC1090 . "${rwx_main_root}/${module}.${RWX_MAIN_EXTENSION}" @@ -60,7 +63,7 @@ rwx_main_main() { done <