check/find

This commit is contained in:
Marc Beninca 2024-11-25 15:33:18 +01:00
parent e9904f2965
commit df136cbad5
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -11,14 +11,16 @@ SH_MAIN="${SH_ROOT}/${SH_MAIN_NAME}"
sh_source_check() {
local file=".shellcheck.sh"
find \
"." \
-type "f" \
-name "*.sh" \
-not \
-name "${file}" \
-printf ". \"%P\"\n" \
>"${file}"
local ifs module modules
modules="$(sh_source_find "." "${file}")"
rm --force "${file}"
ifs="${IFS}"
IFS="
"
for module in ${modules}; do
echo ". \"${module}\"" >>"${file}"
done
IFS="${ifs}"
shellcheck \
--check-sourced \
"${file}"