code/root
All checks were successful
/ job (push) Successful in 2m58s

This commit is contained in:
Marc Beninca 2025-07-09 17:16:00 +02:00
parent 1e40941856
commit 333da5fb6a
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -6,11 +6,10 @@
# │ code │ variables │
# ╰──────┴───────────╯
# TODO variablize
# path to the entrypoint main file of the project
RWX_MAIN_PATH="${rwx_main_root}/${RWX_MAIN_MODULE}.${RWX_MAIN_EXTENSION}"
rwx_code_main="${rwx_main_root}/${RWX_MAIN_MODULE}.${RWX_MAIN_EXTENSION}"
# user root directory of the project
RWX_SELF_USER="${HOME}/${RWX_MAIN_NAME}"
rwx_code_root="${HOME}/${RWX_MAIN_NAME}"
# cache of all sourced code modules
_rwx_code=""
@ -228,10 +227,10 @@ rwx_code_main() {
local modules_main="${1}"
local module modules_user
# find & source modules
modules_user="$(rwx_main_find "${RWX_SELF_USER}")"
modules_user="$(rwx_main_find "${rwx_code_root}")"
while IFS= read -r module; do
# shellcheck disable=SC1090
. "${RWX_SELF_USER}/${module}.${RWX_MAIN_EXTENSION}"
. "${rwx_code_root}/${module}.${RWX_MAIN_EXTENSION}"
done <<EOF
${modules_user}
EOF
@ -248,7 +247,7 @@ EOF
while IFS= read -r module; do
# cache module
_rwx_code="${_rwx_code}#. ${module}
$(cat "${RWX_SELF_USER}/${module}.${RWX_MAIN_EXTENSION}")
$(cat "${rwx_code_root}/${module}.${RWX_MAIN_EXTENSION}")
"
done <<EOF
${modules_user}