#! /bin/sh -f
# convert tek file to ps 
#
# 07/13/01 C.Ludescher
#
# tek2ps must be in the PATH
#
if [ $# -lt 1 ] ; then
	echo "usage: tek2ps_sh tek_file [path of tek2ps.pro] "
	exit; fi

TEKFIL=$1
PSFILE=$1_ps

if  test $# -eq 2; then
	pro_file=$2/tek2ps.pro
elif test -f $NTCC_ROOT/etc/tek2ps.pro; then
	pro_file=$NTCC_ROOT/etc/tek2ps.pro
elif test -f $TRANSP_LOCATION/tek2ps.pro; then
	pro_file=$TRANSP_LOCATION/tek2ps.pro
elif test -f $CODESYSDIR/xtctek/tek2ps.pro; then
	pro_file=$CODESYSDIR/xtctek/tek2ps.pro
elif test -f tek2ps.pro; then
        pro_file=tek2ps.pro
else
	echo " ?tek2ps_sh: specify location of tek2ps.pro"
	exit; fi
#
tek2ps -o $PSFILE -p $pro_file $TEKFIL
rm -f $TEKFIL
