public/find

This commit is contained in:
Marc Beninca 2024-11-25 20:40:57 +01:00
parent 586373ca3f
commit 13e89092e4
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -40,22 +40,6 @@ _sh_main_log() {
# sort # sort
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" |
sort
}
_sh_main_commands() { _sh_main_commands() {
local file="${1}" local file="${1}"
grep "()" "${file}" | grep "()" "${file}" |
@ -90,6 +74,22 @@ main_source_directory() {
# public # public
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" |
sort
}
sh_help() { sh_help() {
sh_log \ sh_log \
"sh_… = shell functions" \ "sh_… = shell functions" \