]> git.cameronkatri.com Git - mandoc.git/commitdiff
Use [ rather than [[ for portability,
authorIngo Schwarze <schwarze@openbsd.org>
Thu, 18 May 2017 14:45:34 +0000 (14:45 +0000)
committerIngo Schwarze <schwarze@openbsd.org>
Thu, 18 May 2017 14:45:34 +0000 (14:45 +0000)
in particular since it makes no difference in the case at hand.
Reported by Leah Neukirchen <leah at vuxu dot org> (Void Linux).

gmdiff

diff --git a/gmdiff b/gmdiff
index 278ce7491f87108a9ab7e8c1e776d5963291b237..535874fc0af8dc39fb1e621f6ebe0f9ade4446ea 100644 (file)
--- a/gmdiff
+++ b/gmdiff
@@ -43,7 +43,7 @@ while [ -n "$1" ]; do
   ${MANDOC:=mandoc} -Ios='OpenBSD ports' $MOPT $file \
     2> /tmp/mandoc.err > /tmp/mandoc.out
   for i in roff mandoc; do
-    [[ -s /tmp/$i.err ]] && echo "$i errors:" && cat /tmp/$i.err
+    [ -s /tmp/$i.err ] && echo "$i errors:" && cat /tmp/$i.err
   done
   diff -au /tmp/roff.out /tmp/mandoc.out 2>&1
 done