summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Voelker <mail@bernhard-voelker.de>2023-01-01 19:22:10 +0100
committerBernhard Voelker <mail@bernhard-voelker.de>2023-01-01 23:15:36 +0100
commit5c43cfb05c9885d743723b1e0a3a7d2b1594dafd (patch)
tree4ef53049ff9a44eb9c15e545d7a4371045be09bc
parent4391e438a4c947f2f4d89ac65c19722a3dd94195 (diff)
downloadfindutils-5c43cfb05c9885d743723b1e0a3a7d2b1594dafd.tar.gz
maint: avoid unportable 'grep -q'
The upcoming gnulib update comes with the new syntax-check named 'sc_unportable_grep_q': maint.mk: unportable 'grep -q', use >/dev/null instead make: *** [maint.mk:1377: sc_unportable_grep_q] Error 1 Fix offending places. * cfg.mk (sc_prohibit_test_calls_print_ver_with_irrelevant_argument): Replace unportable '-q' by redirecting grep output to /dev/null. * doc/find.texi (node Adding Tests): Likewise. * init.cfg (find_emits_warnings_): Likewise.
-rw-r--r--cfg.mk2
-rw-r--r--doc/find.texi2
-rw-r--r--init.cfg2
3 files changed, 3 insertions, 3 deletions
diff --git a/cfg.mk b/cfg.mk
index 97086496..75cf1fc3 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -232,7 +232,7 @@ sc_prohibit_test_calls_print_ver_with_irrelevant_argument:
| { fail=0; \
while read file name; do \
for i in $$name; do \
- grep -w "$$i" $$file|grep -vw print_ver_|grep -q . \
+ grep -w "$$i" $$file|grep -vw print_ver_|grep . >/dev/null \
|| { fail=1; \
echo "*** Test: $$file, offending: $$i." 1>&2; };\
done; \
diff --git a/doc/find.texi b/doc/find.texi
index 379fe646..bf70be6c 100644
--- a/doc/find.texi
+++ b/doc/find.texi
@@ -3050,7 +3050,7 @@ its argument is an unstripped binary file:
@example
#! /bin/sh
-file "$1" | grep -q "not stripped"
+file "$1" | grep "not stripped" >/dev/null
@end example
diff --git a/init.cfg b/init.cfg
index 98423613..42daffb4 100644
--- a/init.cfg
+++ b/init.cfg
@@ -520,7 +520,7 @@ find_emits_warnings_()
{
# Find usually emits a warning for the deprecated -d option.
find -maxdepth 0 -d -quit 2>&1 \
- | grep -q 'warning:'
+ | grep 'warning:' >/dev/null
}
# Skip the current test if "." lacks d_type support.