diff options
Diffstat (limited to 'Build/source/texk/dvipsk/contrib/whichinpath')
-rw-r--r-- | Build/source/texk/dvipsk/contrib/whichinpath | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Build/source/texk/dvipsk/contrib/whichinpath b/Build/source/texk/dvipsk/contrib/whichinpath new file mode 100644 index 00000000000..a45177bb212 --- /dev/null +++ b/Build/source/texk/dvipsk/contrib/whichinpath @@ -0,0 +1,13 @@ +#!/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 |