source/find
This commit is contained in:
parent
c68409c546
commit
47f108f0a3
1 changed files with 15 additions and 0 deletions
15
sh/main.sh
15
sh/main.sh
|
@ -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}" |
|
||||
|
|
Loading…
Reference in a new issue