rectory names, canonicalized with pwd. We can't use cmp -s # since the output file might not actually change from run to run; # e.g., TeX DVI output is timestamped to only the nearest minute. mtd_destdir=`dirname "$dest"` mtd_destdir=`cd "$mtd_destdir" && pwd` mtd_destbase=`basename "$dest"` mtd_sourcedir=`dirname "$1"` mtd_sourcedir=`cd "$mtd_sourcedir" && pwd` mtd_sourcebase=`basename "$1"` if test "$mtd_sourcedir/$mtd_sourcebase" != "$mtd_destdir/$mtd_destbase" then verbose "Moving $1 to $dest" rm -f "$dest" if mv "$1" "$dest" ; then # For --output, report that the file was moved, as TeX has just # reported that it wrote output at the original location. if test z"$oname" != z ; then echo "Moved $1 to $dest" fi else error 1 "Could not move $1 to $dest" fi fi } #