summaryrefslogtreecommitdiffstats
path: root/gmdiff
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-04-07 18:26:10 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-04-07 18:26:10 +0000
commitfd9f544e06376a3fbac067c18598ade49c2c9b20 (patch)
tree9a639065edf4eecb37f8c8c3b0daf9b56e01738f /gmdiff
parent49047e97c9b6560e0920295cb97a381baacf1977 (diff)
downloadmandoc-fd9f544e06376a3fbac067c18598ade49c2c9b20.tar.gz
Make it clear which errors come from which tool.
joint work with sthen@
Diffstat (limited to 'gmdiff')
-rw-r--r--gmdiff9
1 files changed, 6 insertions, 3 deletions
diff --git a/gmdiff b/gmdiff
index a5bca9d3..2c7ba4b3 100644
--- a/gmdiff
+++ b/gmdiff
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (c) 2013 Ingo Schwarze <schwarze@openbsd.org>
+# Copyright (c) 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
@@ -27,8 +27,11 @@ while [ -n "$1" ]; do
file=$1
shift
echo " ========== $file ========== "
- tbl $file | groff -mandoc -Tascii -P -c 2>&1 > /tmp/groff.out
- mandoc -Ios='OpenBSD ports' -Werror $file 2>&1 > /tmp/mandoc.out
+ tbl $file | groff -mandoc -Tascii -P -c 2> /tmp/groff.err > /tmp/groff.out
+ mandoc -Ios='OpenBSD ports' -Werror $file 2> /tmp/mandoc.err > /tmp/mandoc.out
+ for i in groff mandoc; do
+ [[ -s /tmp/$i.err ]] && echo "$i errors:" && cat /tmp/$i.err
+ done
diff -au /tmp/groff.out /tmp/mandoc.out 2>&1
done