public/find
This commit is contained in:
parent
586373ca3f
commit
13e89092e4
1 changed files with 16 additions and 16 deletions
32
sh/main.sh
32
sh/main.sh
|
@ -40,22 +40,6 @@ _sh_main_log() {
|
|||
|
||||
# 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() {
|
||||
local file="${1}"
|
||||
grep "()" "${file}" |
|
||||
|
@ -90,6 +74,22 @@ main_source_directory() {
|
|||
|
||||
# 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_log \
|
||||
"sh_… = shell functions" \
|
||||
|
|
Loading…
Reference in a new issue