#!/bin/csh -f

# tx file

if (-r $1) then
 echo "Checking file..."
else
 echo "no such file"
 exit
endif

# if file exists, check if really want to transfer it
if (-r ../predicates/$1 ) then
 echo "File exists already"
 echo -n "Compare?[y/n] "
 set ans=$<
 if ("$ans" == "y") then
  sdiff ../predicates/$1 $1
 endif
 echo -n "Transfer anyway?[y/n] "
 set ans=$<
 if ("$ans" != "y") then
  exit
 endif
endif

mv $1 ../predicates
