parent
ecc2f53254
commit
19e77a83f6
2 changed files with 18 additions and 15 deletions
|
@ -289,10 +289,11 @@ rwx_code_main() {
|
||||||
# find user modules
|
# find user modules
|
||||||
rwx_code_modules_user="$(rwx_main_find "${rwx_code_root}")"
|
rwx_code_modules_user="$(rwx_main_find "${rwx_code_root}")"
|
||||||
# source user modules
|
# source user modules
|
||||||
while IFS= read -r module; do
|
[ "${rwx_code_modules_user}" ] &&
|
||||||
# shellcheck disable=SC1090
|
while IFS= read -r module; do
|
||||||
. "${rwx_code_root}/${module}.${RWX_MAIN_EXTENSION}"
|
# shellcheck disable=SC1090
|
||||||
done <<EOF
|
. "${rwx_code_root}/${module}.${RWX_MAIN_EXTENSION}"
|
||||||
|
done <<EOF
|
||||||
${rwx_code_modules_user}
|
${rwx_code_modules_user}
|
||||||
EOF
|
EOF
|
||||||
# cache main modules
|
# cache main modules
|
||||||
|
@ -306,13 +307,14 @@ $(cat "${rwx_main_root}/${module}.${RWX_MAIN_EXTENSION}")
|
||||||
${modules_main}
|
${modules_main}
|
||||||
EOF
|
EOF
|
||||||
# cache user modules
|
# cache user modules
|
||||||
while IFS= read -r module; do
|
[ "${rwx_code_modules_user}" ] &&
|
||||||
# cache user module
|
while IFS= read -r module; do
|
||||||
rwx_code_cache_user="${rwx_code_cache_user}\
|
# cache user module
|
||||||
|
rwx_code_cache_user="${rwx_code_cache_user}\
|
||||||
#. ${module}
|
#. ${module}
|
||||||
$(cat "${rwx_code_root}/${module}.${RWX_MAIN_EXTENSION}")
|
$(cat "${rwx_code_root}/${module}.${RWX_MAIN_EXTENSION}")
|
||||||
"
|
"
|
||||||
done <<EOF
|
done <<EOF
|
||||||
${rwx_code_modules_user}
|
${rwx_code_modules_user}
|
||||||
EOF
|
EOF
|
||||||
# load code cache
|
# load code cache
|
||||||
|
|
15
sh/main.sh
15
sh/main.sh
|
@ -39,13 +39,14 @@ rwx_main_path="${rwx_main_root}/${rwx_main_file}"
|
||||||
#| sort
|
#| sort
|
||||||
rwx_main_find() {
|
rwx_main_find() {
|
||||||
local root="${1}"
|
local root="${1}"
|
||||||
find \
|
[ -d "${root}" ] &&
|
||||||
"${root}" \
|
find \
|
||||||
-name "*.${RWX_MAIN_EXTENSION}" \
|
"${root}" \
|
||||||
-type "f" \
|
-name "*.${RWX_MAIN_EXTENSION}" \
|
||||||
-printf "%P\n" |
|
-type "f" \
|
||||||
sed "s|\\.[^.]*\$||" |
|
-printf "%P\n" |
|
||||||
sort
|
sed "s|\\.[^.]*\$||" |
|
||||||
|
sort
|
||||||
}
|
}
|
||||||
|
|
||||||
# ╭──────┬──────╮
|
# ╭──────┬──────╮
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue