if test "$1" = "-u"; then u=true; else u=false; fi

check() {
   if diff $1 results/$1
   then
      echo $1 OK
   else
      echo $1 changed
      if $u
      then
         if test -w results/$1
         then
            cp $1 results/$1
            echo $1 updated
         else
            echo book out $1 to update
            echo "*** $1 not updated ***"
         fi
      else
         echo "run with -u to update (book out first)"
      fi
   fi
}

dane() {
   java -classpath ../../classes com.icl.saxon.StyleSheet $*
}
