#!/bin/csh

#Version  4/24/98
#Synopsis: patser.csh infile matfile outfile

#Convert arguments to variables
set INFILE       = $1
set MATFILE      = $2
set OUTFILE      = $3

# Make a temporary directory to run the program in 
set TEMPDIR = PATSER.$$
mkdir $TEMPDIR
cp $INFILE $TEMPDIR
cp $INFILE.alphabet $TEMPDIR
cp $INFILE.mat $TEMPDIR
cd $TEMPDIR

#-------- run patser  -----------

patser -a $INFILE.alphabet -m $MATFILE < $INFILE > $OUTFILE

mv  -f $OUTFILE ../$OUTFILE
cd ..

/usr/bin/rm -r $TEMPDIR






