1#!/bin/sh 2 3TIF_FILE=$1 4LOG_FILE=$2 5 6if test "$LOG_FILE" = "" ; then 7 echo "Usage: tst1tif.sh tif_file log_file" 8 exit 1 9fi 10 11rm -f _tmptif.log 12 13if test \! -r $TIF_FILE ; then 14 echo $TIF_FILE not found. 15 exit 1 16fi 17 18tiffinfo $TIF_FILE > _tmptif.log 2> /dev/null 19tiffdump $TIF_FILE >> _tmptif.log 20listgeo $TIF_FILE >> _tmptif.log 21 22if test \! -r $LOG_FILE ; then 23 echo "No existing log $LOG_FILE found, using newly generated log." 24 cp _tmptif.log $LOG_FILE 25 rm -f _tmptif.log 26 exit 0 27fi 28 29if diff $LOG_FILE _tmptif.log ; then 30 rm -f _tmptif.log 31 exit 0 32else 33 echo Difference found between ${LOG_FILE}.new and $LOG_FILE 34 cp _tmptif.log ${LOG_FILE}.new 35 rm -f _tmptif.log 36 exit 1 37fi 38 39 40 41 42 43