#!/bin/sh
#
#  Useful with the backtick execution special; helps to find PostScript
#  files on TEXINPUTS.  Contributed by S. P. Q. Rahtz.
#
pathList=`echo ${TEXINPUTS:=.:/usr/local/tex/inputs}  | tr ':' ' '`
theFile=$1

for p in $pathList
do
	test -f $p/$theFile && { echo $p/$theFile; exit 0; }
done
exit 1
