eae28fea7e92eb8acf84686443a3a728a6b3a1d6
[pazpar2-moved-to-github.git] / test / test_tmarc.sh
1 #!/bin/sh
2 res=0
3 for m in tmarc?.xml; do
4         b=`basename $m .xml`
5         l=$b.log.xml
6         r=$b.res.xml
7         d=$b.dif
8         xsltproc ../etc/xsl/tmarc.xsl $m >$l
9         if test -f $r; then
10                 if diff $l $r >$d; then
11                         rm $d
12                 else
13                         echo "$b: FAIL; check $d"
14                         res=1
15                 fi
16         else
17                 echo "$b: making $r for the first time"
18                 mv $l $r
19                 res=1
20         fi
21 done
22 exit $res