#!/bin/csh
#
#   7 Jan 1992 - MWS
#  Execute MEPMAP
#
set JOB=$1
#
if (null$JOB == null) then
   echo "The syntax to execute MEPMAP is "
   echo "     mepmap xxx"
   echo "where xxx is the name of your xxx.mep input file."
   exit
endif
#
if (-e $JOB.mep) then
else
   echo I could not find $JOB.mep in your current directory.
   echo Bombing out...
   exit
endif
#
echo " "
echo "Please enter 'xw' for X-windows output, 'ps' for PostScript."
set OUTPUT=$<
#
setenv MEPMAP $JOB.mep
setenv MEPLOG $JOB.lis
#
#
if ($OUTPUT == xw) then
   mepmap.xw.x
endif
#
if ($OUTPUT == ps) then
   setenv PSTNAM $JOB.ps
   mepmap.ps.x
   echo "Your PostScript image is now in the file $PSTNAM"
   unsetenv PSTNAM
endif
#
unsetenv MEPMAP
unsetenv MEPLOG
exit
