1#!/bin/sh 2# 3# Basic sanity check for tiffcp + tiffsplit + tiffcp 4# 5# First we use tiffcp to join our test files into a multi-frame TIFF 6# then we use tiffsplit to split them out again, and then we use 7# tiffcp to recombine again. 8 9. ${srcdir:-.}/common.sh 10conjoined=deleteme-conjoined-$$.tif 11reconjoined=deleteme-reconjoined-$$.tif 12splitfile=deleteme-split-$$ 13 14operation=tiffcp 15${TIFFCP} ${IMG_UNCOMPRESSED} ${conjoined} 16status=$? 17if test $status -eq 0 18then 19 operation=tiffsplit 20 ${TIFFSPLIT} ${conjoined} ${splitfile} 21 status=$? 22 if test $status -eq 0 23 then 24 operation=tiffcp 25 ${TIFFCP} ${splitfile}* ${reconjoined} 26 status=$? 27 fi 28fi 29 30if test $status -eq 0 31then 32 rm -f ${conjoined} ${splitfile}* ${reconjoined} 33else 34 echo "Test failed (${operation} returned ${status}). Please inspect these output files:" 35 echo " " ${conjoined} ${splitfile}* ${reconjoined} 36fi 37 38exit $status 39