check/find
This commit is contained in:
parent
e9904f2965
commit
df136cbad5
1 changed files with 10 additions and 8 deletions
18
sh/main.sh
18
sh/main.sh
|
@ -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}"
|
||||
|
|
Loading…
Reference in a new issue