fixes
All checks were successful
/ job (push) Successful in 2m57s

This commit is contained in:
Marc Beninca 2025-07-12 15:10:56 +02:00
parent ecc2f53254
commit 19e77a83f6
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 18 additions and 15 deletions

View file

@ -289,10 +289,11 @@ rwx_code_main() {
# find user modules
rwx_code_modules_user="$(rwx_main_find "${rwx_code_root}")"
# source user modules
while IFS= read -r module; do
# shellcheck disable=SC1090
. "${rwx_code_root}/${module}.${RWX_MAIN_EXTENSION}"
done <<EOF
[ "${rwx_code_modules_user}" ] &&
while IFS= read -r module; do
# shellcheck disable=SC1090
. "${rwx_code_root}/${module}.${RWX_MAIN_EXTENSION}"
done <<EOF
${rwx_code_modules_user}
EOF
# cache main modules
@ -306,13 +307,14 @@ $(cat "${rwx_main_root}/${module}.${RWX_MAIN_EXTENSION}")
${modules_main}
EOF
# cache user modules
while IFS= read -r module; do
# cache user module
rwx_code_cache_user="${rwx_code_cache_user}\
[ "${rwx_code_modules_user}" ] &&
while IFS= read -r module; do
# cache user module
rwx_code_cache_user="${rwx_code_cache_user}\
#. ${module}
$(cat "${rwx_code_root}/${module}.${RWX_MAIN_EXTENSION}")
"
done <<EOF
done <<EOF
${rwx_code_modules_user}
EOF
# load code cache

View file

@ -39,13 +39,14 @@ rwx_main_path="${rwx_main_root}/${rwx_main_file}"
#| sort
rwx_main_find() {
local root="${1}"
find \
"${root}" \
-name "*.${RWX_MAIN_EXTENSION}" \
-type "f" \
-printf "%P\n" |
sed "s|\\.[^.]*\$||" |
sort
[ -d "${root}" ] &&
find \
"${root}" \
-name "*.${RWX_MAIN_EXTENSION}" \
-type "f" \
-printf "%P\n" |
sed "s|\\.[^.]*\$||" |
sort
}
# ╭──────┬──────╮