diff options
author | G. Branden Robinson <g.branden.robinson@gmail.com> | 2022-07-23 06:22:10 -0500 |
---|---|---|
committer | G. Branden Robinson <g.branden.robinson@gmail.com> | 2022-07-23 11:25:31 -0500 |
commit | 6881b5e52ee43ae20ab31b44ee105613affa5f88 (patch) | |
tree | c8dc5b1b58b9c1f668af101b8d5380e1d9a72002 /m4 | |
parent | be957d6ba9b7fc6d153687791a16522618b423bf (diff) | |
download | groff-git-6881b5e52ee43ae20ab31b44ee105613affa5f88.tar.gz |
m4/groff.m4 (GROFF_PAGE): Refactor.
* m4/groff.m4 (GROFF_PAGE): Use 'grep -q' instead of redirecting
standard output to null device. The '-q' option was standardized in
POSIX Issue 5 (1997). Also drop the redirection of the standard error
stream; we have already checked the file named in "$descfile" for
existence and readability. grep should not emit diagnostic messages.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/groff.m4 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/m4/groff.m4 b/m4/groff.m4 index 76dce206b..1d2c6d435 100644 --- a/m4/groff.m4 +++ b/m4/groff.m4 @@ -888,10 +888,10 @@ AC_DEFUN([GROFF_PAGE], [ if test -n "$descfile" then - if grep ['^paperlength[ ]\+841890'] "$descfile" >/dev/null 2>&1 + if grep -q ['^paperlength[ ]\+841890'] "$descfile" then PAGE=A4 - elif grep ['^papersize[ ]\+[aA]4'] "$descfile" >/dev/null 2>&1 + elif grep -q ['^papersize[ ]\+[aA]4'] "$descfile" then PAGE=A4 fi |