#! /bin/bash # Last edited on 2003-03-09 12:30:00 by stolfi usage="${0##*/}" # Checks whether every image ${DIR}/${NAME}.jpg under the current directory # has the grid information files: # ${DIR}/batch.grsz or ${DIR}/DSCnnnnn.grsz # ${DIR}/DSCnnnnn.grpts # ${DIR}/DSCnnnnn.grmap # ${DIR}/DSCnnnnn.grays # ${DIR}/DSCnnnnn-g.jpg if [ $# -ne 0 ]; then echo "usage: ${usage}"; exit 1; fi tmp="/tmp/$$" find ./ \ \( -name '*.jpg' -o -name '*.tif' -o -name '*.JPG' -o -name '*.TIF' \) \ -print \ | egrep -v '[-][a-z][.]' \ | egrep -v '[-](frags|ground)[.]' \ | sed -e 's:^[.][/]::g' \ | sort \ > ${tmp}.imgs for f in `cat ${tmp}.imgs | sed -e 's:[.][a-zA-Z0-9]*$::'` ; do ok=1 bat="`echo ${f} | sed -e 's:[/][-.a-zA-Z0-9]*$::'`" if [ ! -r ${f}.grsz ] && [ ! -r ${bat}/batch.grsz ]; then echo "missing ${bat}/batch.grsz and ${f}.grsz"; ok=0; fi if [ ! -r ${f}.grpts ]; then echo "missing ${f}.grpts"; ok=0; fi if [ ! -r ${f}.grmap ]; then echo "missing ${f}.grmap"; ok=0; fi if [ ! -r ${f}-g.jpg ]; then echo "missing ${f}-g.jpg"; ok=0; fi if [ ${ok} -eq 0 ]; then echo "check ${f}-s.jpg"; fi done rm ${tmp}.imgs