#! /bin/csh -f
# Last edited on 2002-03-31 19:52:59 by stolfi

set cmd = "$0"; set cmd = "${cmd:t}"
set usage = "${cmd} DATEDIR..."

set dirs = ( $* )
if ( $#dirs == 0 ) then
  set dirs = ( `ls [0-9]*[0-9]` )
  if ( $#dirs == 0 ) then
    echo "no dated directories found"
    echo "usage: ${usage}"; exit 1
  endif
endif

if ( $#dirs > 1 ) then
  set dref = ${dirs[1]}
  foreach dir ( ${dirs[2-]} )
    echo ${dir}/.diff
    compare-povray-dirs ${dref} ${dir} > ${dir}/.diff
  end
  echo " "
  if ( $#dirs > 2 ) then
    set dbas = ${dirs[2]}
    foreach dir ( ${dirs[3-]} )
      echo ${dir}/.diff.diff
      diff -bB ${dbas}/.diff ${dir}/.diff > ${dir}/.diff.diff
    end
  endif
else
  echo "only one directory, nothing to diff"
endif

    
