modules/name,user
This commit is contained in:
parent
af31b433ac
commit
bfcfde3520
1 changed files with 29 additions and 6 deletions
|
@ -8,6 +8,10 @@
|
||||||
|
|
||||||
# path to the entrypoint main file of the project
|
# path to the entrypoint main file of the project
|
||||||
rwx_code_main="${rwx_main_root}/${RWX_MAIN_MODULE}.${RWX_MAIN_EXTENSION}"
|
rwx_code_main="${rwx_main_root}/${RWX_MAIN_MODULE}.${RWX_MAIN_EXTENSION}"
|
||||||
|
# main modules names
|
||||||
|
rwx_code_modules_main=""
|
||||||
|
# user modules names
|
||||||
|
rwx_code_modules_user=""
|
||||||
# user root directory of the project
|
# user root directory of the project
|
||||||
rwx_code_root="${HOME}/${RWX_MAIN_NAME}"
|
rwx_code_root="${HOME}/${RWX_MAIN_NAME}"
|
||||||
|
|
||||||
|
@ -149,6 +153,25 @@ rwx_code_functions() {
|
||||||
echo "${_rwx_code_functions}"
|
echo "${_rwx_code_functions}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# show all the cached main modules
|
||||||
|
#= rcm
|
||||||
|
rwx_code_modules() {
|
||||||
|
rwx_code_modules_main
|
||||||
|
rwx_code_modules_user
|
||||||
|
}
|
||||||
|
|
||||||
|
# show the cached main modules
|
||||||
|
#= rcmm
|
||||||
|
rwx_code_modules_main() {
|
||||||
|
echo "${rwx_code_modules_main}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# show the cached user modules
|
||||||
|
#= rcmu
|
||||||
|
rwx_code_modules_user() {
|
||||||
|
echo "${rwx_code_modules_user}"
|
||||||
|
}
|
||||||
|
|
||||||
# show the cached variables
|
# show the cached variables
|
||||||
#= rcv
|
#= rcv
|
||||||
rwx_code_variables() {
|
rwx_code_variables() {
|
||||||
|
@ -226,15 +249,15 @@ rwx_code_parse() {
|
||||||
rwx_code_main() {
|
rwx_code_main() {
|
||||||
local modules_main="${1}"
|
local modules_main="${1}"
|
||||||
local module
|
local module
|
||||||
local modules_user
|
rwx_code_modules_main="${modules_main}"
|
||||||
# find user modules
|
# find user modules
|
||||||
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
|
while IFS= read -r module; do
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
. "${rwx_code_root}/${module}.${RWX_MAIN_EXTENSION}"
|
. "${rwx_code_root}/${module}.${RWX_MAIN_EXTENSION}"
|
||||||
done <<EOF
|
done <<EOF
|
||||||
${modules_user}
|
${rwx_code_modules_user}
|
||||||
EOF
|
EOF
|
||||||
# cache main modules
|
# cache main modules
|
||||||
while IFS= read -r module; do
|
while IFS= read -r module; do
|
||||||
|
@ -245,14 +268,14 @@ $(cat "${rwx_main_root}/${module}.${RWX_MAIN_EXTENSION}")
|
||||||
done <<EOF
|
done <<EOF
|
||||||
${modules_main}
|
${modules_main}
|
||||||
EOF
|
EOF
|
||||||
# cache modules
|
# cache user modules
|
||||||
while IFS= read -r module; do
|
while IFS= read -r module; do
|
||||||
# cache module
|
# cache user module
|
||||||
_rwx_code="${_rwx_code}#. ${module}
|
_rwx_code="${_rwx_code}#. ${module}
|
||||||
$(cat "${rwx_code_root}/${module}.${RWX_MAIN_EXTENSION}")
|
$(cat "${rwx_code_root}/${module}.${RWX_MAIN_EXTENSION}")
|
||||||
"
|
"
|
||||||
done <<EOF
|
done <<EOF
|
||||||
${modules_user}
|
${rwx_code_modules_user}
|
||||||
EOF
|
EOF
|
||||||
# load code cache
|
# load code cache
|
||||||
rwx_code_load
|
rwx_code_load
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue