source/find

This commit is contained in:
Marc Beninca 2024-11-25 14:45:16 +01:00
parent c68409c546
commit 47f108f0a3
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -24,6 +24,21 @@ sh_source_check() {
rm "${file}"
}
sh_source_find() {
local root="${1}"
local file="${2}"
set -- \
"${root}" \
-name "*.sh" \
-type "f"
[ -n "${file}" ] &&
set -- "${@}" \
-not \
-name "${file}"
find "${@}" \
-printf "%P\n"
}
_sh_main_commands() {
local file="${1}"
grep "()" "${file}" |