test.sh
662 Bytes
#!/bin/sh
FILES=${@:-"odt"}
GLOBIGNORE="*-orig.*"
# ./odt2tei.py -d test odt/{2_066_000005112.odt,2_077_000005200.odt,8_23-KomOswiaty.odt}
./odt2tei.py -d test -v "$VERBOSE" test/md/{2_066_000005112.md,2_077_000005200.md,8_23-KomOswiaty.md} > test.log
cat test.log
if [ ! -s "test.log" ]; then
rm -f test.log
fi
if [ "$1" == "-a" ]; then
shift
ACCEPT=1
fi
cd test/clean
if [ "$1" ]; then FILES=$(find . -name "$1*"); else FILES=*.md; fi
mkdir -p ../orig
if [ "$ACCEPT" ]; then
for md in $FILES; do
cp $md ../orig
done
else
rm -f ../../test.diff
for md in $FILES; do
echo "### Check $md..."
diff ../orig/$md $md
done | tee -a ../../test.diff
fi