#! /bin/csh -f
# Last modified on Sat May 11  6:25:52 PDT 1991 by stolfi

# Applies a "trans" edit script to a set of files
# Usage: trans-files -f <trans prog file> <file>...
# or     trans-files -o <compiled trans prog file> <file> ...

if (("$1" != '-f') & ("$1" != '-o')) then
  echo 'Usage: trans-files -f <trans prog file> <file> ...'
  echo 'or     trans-files -o <compiled trans prog file> <file> ...'
  exit(1)
endif
if (-f $2 == 0) then
  echo $2 is not a file\!
  exit(1)
endif
if ("$1" == '-f') then
  filter-files "trans $2" $argv[3-]
else if ("$1" == '-o') then
  filter-files "trans -o $2" $argv[3-]
else
  echo "script error"
  exit(1)
endif
