#!/bin/tcsh

# A wrapper to call ghostscript in the correct folder.
# By Richard Koch, July 29, 2001, following similar code by
# Gerben Wierda

if ("$argv[1]" == "Panther") then
    set filename = "$argv[3]"
    /usr/bin/pstopdf "${filename}"
    
else


set mygspath = "$argv[2]"
if (-x ${mygspath}/ps2pdf) then
	setenv PATH "${mygspath}:${PATH}"
	rehash
endif

set filename = "$argv[3]"
ps2pdf "${filename}"

endif
