find with extension

This commit is contained in:
Marc Beninca 2025-07-27 13:00:04 +02:00
parent 9e3c268b1c
commit 52593c9571
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
4 changed files with 5 additions and 7 deletions

View file

@ -35,7 +35,6 @@ rwx_main_path="${rwx_main_root}/${rwx_main_file}"
# FIXME separate in two functions
# find root directory shell modules
#| find
#| sed
#| sort
rwx_main_find() {
local root="${1}"
@ -45,7 +44,6 @@ rwx_main_find() {
-name "*.${RWX_MAIN_EXTENSION}" \
-type "f" \
-printf "%P\n" |
sed "s|\\.[^.]*\$||" |
sort
}
@ -66,7 +64,7 @@ rwx_main_main() {
# except currently running main module
if [ "${module}" != "${RWX_MAIN_MODULE}" ]; then
# shellcheck disable=SC1090
. "${rwx_main_root}/${module}.${RWX_MAIN_EXTENSION}"
. "${rwx_main_root}/${module}"
fi
done <<EOF
${modules}