diff options
author | Kerin Millar <kfm@plushkava.net> | 2024-07-08 06:24:32 +0100 |
---|---|---|
committer | Kerin Millar <kfm@plushkava.net> | 2024-07-08 06:24:32 +0100 |
commit | 4e09cd6073e9f7906081231af7511bc74cd1d1bb (patch) | |
tree | 04ddb59ba619eaf6e2bf70de4aa690f400ba7934 /functions/rc.sh | |
parent | Render _contains_all() compatible with mawk (diff) | |
download | gentoo-functions-4e09cd6073e9f7906081231af7511bc74cd1d1bb.tar.gz gentoo-functions-4e09cd6073e9f7906081231af7511bc74cd1d1bb.tar.bz2 gentoo-functions-4e09cd6073e9f7906081231af7511bc74cd1d1bb.zip |
Add the _find0() helper function
The function is a simple wrapper around GNU find(1) which presumes the
intent to use the -files0-from option to read NUL-delimited path names
from the standard input. The benefit in having it is twofold. Firstly,
the _select_by_mtime() and is_older_than() functions are thereby made a
little easier to read. Secondly, the genfun_bin_find variable is now
initialised lazily.
Signed-off-by: Kerin Millar <kfm@plushkava.net>
Diffstat (limited to 'functions/rc.sh')
-rw-r--r-- | functions/rc.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/functions/rc.sh b/functions/rc.sh index 2f2dc52..9129b32 100644 --- a/functions/rc.sh +++ b/functions/rc.sh @@ -213,7 +213,7 @@ is_older_than() fi shift { test "$#" -gt 0 && printf '%s\0' "$@"; } \ - | "${genfun_bin_find}" -L -files0-from - ${ref:+-newermm} ${ref:+"${ref}"} -printf '\n' -quit \ + | _find0 -L ${ref:+-newermm} ${ref:+"${ref}"} -printf '\n' -quit \ | read -r _ } |