summaryrefslogtreecommitdiff
path: root/test_pics.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test_pics.sh')
-rwxr-xr-xtest_pics.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/test_pics.sh b/test_pics.sh
new file mode 100755
index 00000000..8605ead7
--- /dev/null
+++ b/test_pics.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+#
+# The -f force flag will force new logs to overwrite existing ones.
+#
+FORCE=0
+if test "$1" = "-f" ; then
+ FORCE=1
+ shift
+fi
+
+#
+# Loop over all passed TIFF files
+#
+for a in $* ; do
+ BASE=`dirname $a`/`basename $a .tif`
+ tools/tiffdump $a > ${BASE}.rpt.new
+
+ if test $FORCE = 1 ; then
+ mv ${BASE}.rpt.new ${BASE}.rpt
+ continue;
+ fi
+
+ if diff ${BASE}.rpt ${BASE}.rpt.new ; then
+ rm ${BASE}.rpt.new
+ else
+ echo Differences between ${BASE}.rpt and ${BASE}.rpt.new
+ fi
+done