mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-26 09:33:14 +01:00
Quit find after finding the first newer file
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
550003f0f4
commit
e0a757ea03
@ -383,7 +383,7 @@ uptodate() {
|
|||||||
local ifs
|
local ifs
|
||||||
|
|
||||||
if [ -n "$g_shorewalldir" ]; then
|
if [ -n "$g_shorewalldir" ]; then
|
||||||
if [ -n "$(find ${dir} -maxdepth 1 -type f -newer $1)" ]; then
|
if [ -n "$(find ${dir} -maxdepth 1 -type f -newer $1 -print -quit)" ]; then
|
||||||
return 1;
|
return 1;
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -393,7 +393,7 @@ uptodate() {
|
|||||||
|
|
||||||
for dir in $CONFIG_PATH; do
|
for dir in $CONFIG_PATH; do
|
||||||
if [ -n "$dir" ]; then
|
if [ -n "$dir" ]; then
|
||||||
if [ -n "$(find ${dir} -maxdepth 1 -type f -newer $1)" ]; then
|
if [ -n "$(find ${dir} -maxdepth 1 -type f -newer $1 -print -quit)" ]; then
|
||||||
IFS="$ifs"
|
IFS="$ifs"
|
||||||
return 1;
|
return 1;
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user