source/file

This commit is contained in:
Marc Beninca 2025-07-03 20:42:59 +02:00
parent 706847f746
commit ebc41e8a53
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -38,7 +38,7 @@ RWX_MAIN_PATH="${RWX_ROOT_SYSTEM}/${RWX_MAIN_NAME}"
# run initial steps
rwx_main() {
# source system root
if ! rwx_source "${RWX_ROOT_SYSTEM}"; then
if ! rwx_source "${RWX_ROOT_SYSTEM}" "${RWX_MAIN_NAME}"; then
__rwx_log "Not a directory: ${RWX_ROOT_SYSTEM}"
return 1
fi
@ -62,12 +62,13 @@ rwx_source() {
local root="${1}"
[ -d "${root}" ] ||
return 1
local file="${2}"
local count module
count=0
__rwx_log "" \
". ${root}"
rwx_ifs_set
for module in $(rwx_find_shell "${root}" "${RWX_MAIN_NAME}"); do
for module in $(rwx_find_shell "${root}" "${file}"); do
count=$((count + 1))
__rwx_log "$(printf "%02d" "${count}") ${module%.sh}"
module="${root}/${module}"