#! /bin/bash # Last edited on 2008-02-04 21:55:00 by stolfi usage="${0##*/}" # Reads from the directory "IAB-2002/raw-sorted" the file # "gridsizes.txt" which contains the raw grid size data for all images. # After filtering that file through "cleanup-gridsizes", writes the # grid sizes for each image "{IMAGE}.jpg" listed in # "gridsizes.txt" to the file "{IMAGE}.grsz" under that same # directory. # # The {IMAGE} may be "batch" if all images in the same batch directory # use the same grid. if [ $# -ne 0 ]; then echo "usage: ${usage}"; exit 1; fi batroot="${STOLFIHOME}/projects/fragments/IAB-2002/raw-sorted" tools="${STOLFIHOME}/projects/fragments/IAB-2002/tools" ( cd ${batroot}/. ) tmpbash="/tmp/$$.bash" ( cd ${batroot}/. ) cd ${batroot} ${tools}/cleanup-gridsizes \ < ${batroot}/gridsizes.txt \ > ${tmpbash} || exit 1 source ${tmpbash} rm ${tmpbash}