Fix a regression in [r8062] (extra space with French smartquotes again).
[docutils.git] / sandbox / manpage-writer / check
blob4189288144108346265041089aa3f0eb6e0fe38f
1 #!/bin/sh
3 # Author: Engelbert Gruber <grubert@users.sf.net>
4 # Copyright: This module has been placed in the public domain.
6 IN_DIR=input
7 OUT_DIR=output
8 EXP_DIR=expected
10 if [ "$1" = "create" ] ; then
11 CREATE=1
14 TMPF_OUT=diff-out.tmp.$$
15 TMPF_EXP=diff-exp.tmp.$$
16 for IN_F in $IN_DIR/*.txt ; do
17 BASE=`basename $IN_F`
18 F_BASE=${BASE%.txt}
19 TMPF=$BASE.$$.diff
20 echo "File: $BASE" > $TMPF_EXP
21 grep -v "Generated by docutils manpage writer on" $EXP_DIR/$F_BASE.man >> $TMPF_EXP
22 grep -v "Generated by docutils manpage writer on" $OUT_DIR/$F_BASE.man > $TMPF_OUT
23 diff -s -u $TMPF_EXP $TMPF_OUT > $TMPF
24 if test $? -gt 0 ; then
25 less $TMPF
26 if [ "$CREATE" = "1" ] ; then
27 cp $OUT_DIR/$F_BASE.man $EXP_DIR
30 rm $TMPF
31 done
32 rm $TMPF_OUT $TMPF_EXP