[gs-cvs] rev 8107 - trunk/gs/lib

till at ghostscript.com till at ghostscript.com
Thu Jul 5 12:04:30 PDT 2007


Author: till
Date: 2007-07-05 12:04:29 -0700 (Thu, 05 Jul 2007)
New Revision: 8107

Modified:
   trunk/gs/lib/bdftops
   trunk/gs/lib/dumphint
   trunk/gs/lib/eps2eps
   trunk/gs/lib/font2c
   trunk/gs/lib/gsbj
   trunk/gs/lib/gsdj
   trunk/gs/lib/gsdj500
   trunk/gs/lib/gslj
   trunk/gs/lib/gslp
   trunk/gs/lib/gsnd
   trunk/gs/lib/pdf2dsc
   trunk/gs/lib/pdf2ps
   trunk/gs/lib/pdfopt
   trunk/gs/lib/pf2afm
   trunk/gs/lib/pfbtopfa
   trunk/gs/lib/pphs
   trunk/gs/lib/printafm
   trunk/gs/lib/ps2epsi
   trunk/gs/lib/ps2pdf
   trunk/gs/lib/ps2pdf12
   trunk/gs/lib/ps2pdf13
   trunk/gs/lib/ps2pdf14
   trunk/gs/lib/ps2pdfwr
   trunk/gs/lib/ps2ps
   trunk/gs/lib/wftopfa
Log:
Let scripts search Ghostscript (or subscripts) in the same directory where they reside, bug 689318.


Modified: trunk/gs/lib/bdftops
===================================================================
--- trunk/gs/lib/bdftops	2007-07-05 18:12:59 UTC (rev 8106)
+++ trunk/gs/lib/bdftops	2007-07-05 19:04:29 UTC (rev 8107)
@@ -4,5 +4,10 @@
 # This definition is changed on install to match the
 # executable name set in the makefile
 GS_EXECUTABLE=gs
+gs="`dirname $0`/$GS_EXECUTABLE"
+if test ! -x "$gs"; then
+	gs="$GS_EXECUTABLE"
+fi
+GS_EXECUTABLE="$gs"
 
-exec $GS_EXECUTABLE -q -dBATCH -dNODISPLAY -- bdftops.ps "$@"
+exec "$GS_EXECUTABLE" -q -dBATCH -dNODISPLAY -- bdftops.ps "$@"

Modified: trunk/gs/lib/dumphint
===================================================================
--- trunk/gs/lib/dumphint	2007-07-05 18:12:59 UTC (rev 8106)
+++ trunk/gs/lib/dumphint	2007-07-05 19:04:29 UTC (rev 8107)
@@ -5,6 +5,11 @@
 # This definition is changed on install to match the
 # executable name set in the makefile
 GS_EXECUTABLE=gs
+gs="`dirname $0`/$GS_EXECUTABLE"
+if test ! -x "$gs"; then
+	gs="$GS_EXECUTABLE"
+fi
+GS_EXECUTABLE="$gs"
 
 
 OPTIONS="-dSAFER -dDELAYSAFER"
@@ -22,4 +27,4 @@
 	exit 1
 fi
 
-exec $GS_EXECUTABLE -q -dNODISPLAY $OPTIONS -- dumphint.ps "$1"
+exec "$GS_EXECUTABLE" -q -dNODISPLAY $OPTIONS -- dumphint.ps "$1"

Modified: trunk/gs/lib/eps2eps
===================================================================
--- trunk/gs/lib/eps2eps	2007-07-05 18:12:59 UTC (rev 8106)
+++ trunk/gs/lib/eps2eps	2007-07-05 19:04:29 UTC (rev 8107)
@@ -5,6 +5,11 @@
 # This definition is changed on install to match the
 # executable name set in the makefile
 GS_EXECUTABLE=gs
+gs="`dirname $0`/$GS_EXECUTABLE"
+if test ! -x "$gs"; then
+	gs="$GS_EXECUTABLE"
+fi
+GS_EXECUTABLE="$gs"
 
 OPTIONS="-dDEVICEWIDTH=250000 -dDEVICEHEIGHT=250000"
 while true
@@ -21,4 +26,4 @@
 	exit 1
 fi
 
-exec $GS_EXECUTABLE -q -sDEVICE=epswrite "-sOutputFile=$2" -dNOPAUSE -dBATCH -dSAFER $OPTIONS "$1"
+exec "$GS_EXECUTABLE" -q -sDEVICE=epswrite "-sOutputFile=$2" -dNOPAUSE -dBATCH -dSAFER $OPTIONS "$1"

Modified: trunk/gs/lib/font2c
===================================================================
--- trunk/gs/lib/font2c	2007-07-05 18:12:59 UTC (rev 8106)
+++ trunk/gs/lib/font2c	2007-07-05 19:04:29 UTC (rev 8107)
@@ -4,5 +4,10 @@
 # This definition is changed on install to match the
 # executable name set in the makefile
 GS_EXECUTABLE=gs
+gs="`dirname $0`/$GS_EXECUTABLE"
+if test ! -x "$gs"; then
+	gs="$GS_EXECUTABLE"
+fi
+GS_EXECUTABLE="$gs"
 
-exec $GS_EXECUTABLE -q -dNODISPLAY -dWRITESYSTEMDICT -- font2c.ps "$@"
+exec "$GS_EXECUTABLE" -q -dNODISPLAY -dWRITESYSTEMDICT -- font2c.ps "$@"

Modified: trunk/gs/lib/gsbj
===================================================================
--- trunk/gs/lib/gsbj	2007-07-05 18:12:59 UTC (rev 8106)
+++ trunk/gs/lib/gsbj	2007-07-05 19:04:29 UTC (rev 8107)
@@ -4,5 +4,10 @@
 # This definition is changed on install to match the
 # executable name set in the makefile
 GS_EXECUTABLE=gs
+gs="`dirname $0`/$GS_EXECUTABLE"
+if test ! -x "$gs"; then
+	gs="$GS_EXECUTABLE"
+fi
+GS_EXECUTABLE="$gs"
 
-exec $GS_EXECUTABLE -q -sDEVICE=bj10e -r180 -dNOPAUSE -sPROGNAME=$0 -- gslp.ps --heading-center "`date`" "$@"
+exec "$GS_EXECUTABLE" -q -sDEVICE=bj10e -r180 -dNOPAUSE -sPROGNAME=$0 -- gslp.ps --heading-center "`date`" "$@"

Modified: trunk/gs/lib/gsdj
===================================================================
--- trunk/gs/lib/gsdj	2007-07-05 18:12:59 UTC (rev 8106)
+++ trunk/gs/lib/gsdj	2007-07-05 19:04:29 UTC (rev 8107)
@@ -4,5 +4,10 @@
 # This definition is changed on install to match the
 # executable name set in the makefile
 GS_EXECUTABLE=gs
+gs="`dirname $0`/$GS_EXECUTABLE"
+if test ! -x "$gs"; then
+	gs="$GS_EXECUTABLE"
+fi
+GS_EXECUTABLE="$gs"
 
-exec $GS_EXECUTABLE -q -sDEVICE=deskjet -r300 -dNOPAUSE -sPROGNAME=$0 -- gslp.ps --heading-center "`date`" "$@"
+exec "$GS_EXECUTABLE" -q -sDEVICE=deskjet -r300 -dNOPAUSE -sPROGNAME=$0 -- gslp.ps --heading-center "`date`" "$@"

Modified: trunk/gs/lib/gsdj500
===================================================================
--- trunk/gs/lib/gsdj500	2007-07-05 18:12:59 UTC (rev 8106)
+++ trunk/gs/lib/gsdj500	2007-07-05 19:04:29 UTC (rev 8107)
@@ -4,5 +4,10 @@
 # This definition is changed on install to match the
 # executable name set in the makefile
 GS_EXECUTABLE=gs
+gs="`dirname $0`/$GS_EXECUTABLE"
+if test ! -x "$gs"; then
+	gs="$GS_EXECUTABLE"
+fi
+GS_EXECUTABLE="$gs"
 
-exec $GS_EXECUTABLE -q -sDEVICE=djet500 -r300 -dNOPAUSE -sPROGNAME=$0 -- gslp.ps --heading-center "`date`" "$@"
+exec "$GS_EXECUTABLE" -q -sDEVICE=djet500 -r300 -dNOPAUSE -sPROGNAME=$0 -- gslp.ps --heading-center "`date`" "$@"

Modified: trunk/gs/lib/gslj
===================================================================
--- trunk/gs/lib/gslj	2007-07-05 18:12:59 UTC (rev 8106)
+++ trunk/gs/lib/gslj	2007-07-05 19:04:29 UTC (rev 8107)
@@ -4,5 +4,10 @@
 # This definition is changed on install to match the
 # executable name set in the makefile
 GS_EXECUTABLE=gs
+gs="`dirname $0`/$GS_EXECUTABLE"
+if test ! -x "$gs"; then
+	gs="$GS_EXECUTABLE"
+fi
+GS_EXECUTABLE="$gs"
 
-exec $GS_EXECUTABLE -q -sDEVICE=laserjet -r300 -dNOPAUSE -sPROGNAME=$0 -- gslp.ps --heading-center "`date`" "$@"
+exec "$GS_EXECUTABLE" -q -sDEVICE=laserjet -r300 -dNOPAUSE -sPROGNAME=$0 -- gslp.ps --heading-center "`date`" "$@"

Modified: trunk/gs/lib/gslp
===================================================================
--- trunk/gs/lib/gslp	2007-07-05 18:12:59 UTC (rev 8106)
+++ trunk/gs/lib/gslp	2007-07-05 19:04:29 UTC (rev 8107)
@@ -4,5 +4,10 @@
 # This definition is changed on install to match the
 # executable name set in the makefile
 GS_EXECUTABLE=gs
+gs="`dirname $0`/$GS_EXECUTABLE"
+if test ! -x "$gs"; then
+	gs="$GS_EXECUTABLE"
+fi
+GS_EXECUTABLE="$gs"
 
-exec $GS_EXECUTABLE -q -sDEVICE=epson -r180 -dNOPAUSE -sPROGNAME=$0 -- gslp.ps --heading-center "`date`" "$@"
+exec "$GS_EXECUTABLE" -q -sDEVICE=epson -r180 -dNOPAUSE -sPROGNAME=$0 -- gslp.ps --heading-center "`date`" "$@"

Modified: trunk/gs/lib/gsnd
===================================================================
--- trunk/gs/lib/gsnd	2007-07-05 18:12:59 UTC (rev 8106)
+++ trunk/gs/lib/gsnd	2007-07-05 19:04:29 UTC (rev 8107)
@@ -4,5 +4,10 @@
 # This definition is changed on install to match the
 # executable name set in the makefile
 GS_EXECUTABLE=gs
+gs="`dirname $0`/$GS_EXECUTABLE"
+if test ! -x "$gs"; then
+	gs="$GS_EXECUTABLE"
+fi
+GS_EXECUTABLE="$gs"
 
-exec $GS_EXECUTABLE -dNODISPLAY "$@"
+exec "$GS_EXECUTABLE" -dNODISPLAY "$@"

Modified: trunk/gs/lib/pdf2dsc
===================================================================
--- trunk/gs/lib/pdf2dsc	2007-07-05 18:12:59 UTC (rev 8106)
+++ trunk/gs/lib/pdf2dsc	2007-07-05 19:04:29 UTC (rev 8107)
@@ -9,6 +9,11 @@
 # This definition is changed on install to match the
 # executable name set in the makefile
 GS_EXECUTABLE=gs
+gs="`dirname $0`/$GS_EXECUTABLE"
+if test ! -x "$gs"; then
+	gs="$GS_EXECUTABLE"
+fi
+GS_EXECUTABLE="$gs"
 
 me=`basename $0`
 
@@ -26,5 +31,5 @@
 dscfile=$2
 : ${dscfile:=`echo $pdffile | sed 's,\.[^/.]*,,'`.dsc}
 
-exec $GS_EXECUTABLE -q -dNODISPLAY -dSAFER -dDELAYSAFER\
+exec "$GS_EXECUTABLE" -q -dNODISPLAY -dSAFER -dDELAYSAFER\
     -sPDFname="$pdffile" -sDSCname="$dscfile" pdf2dsc.ps -c quit

Modified: trunk/gs/lib/pdf2ps
===================================================================
--- trunk/gs/lib/pdf2ps	2007-07-05 18:12:59 UTC (rev 8106)
+++ trunk/gs/lib/pdf2ps	2007-07-05 19:04:29 UTC (rev 8107)
@@ -5,6 +5,11 @@
 # This definition is changed on install to match the
 # executable name set in the makefile
 GS_EXECUTABLE=gs
+gs="`dirname $0`/$GS_EXECUTABLE"
+if test ! -x "$gs"; then
+	gs="$GS_EXECUTABLE"
+fi
+GS_EXECUTABLE="$gs"
 
 OPTIONS=""
 while true
@@ -30,4 +35,4 @@
 # Doing an initial 'save' helps keep fonts from being flushed between pages.
 # We have to include the options twice because -I only takes effect if it
 # appears before other options.
-exec $GS_EXECUTABLE $OPTIONS -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pswrite "-sOutputFile=$outfile" $OPTIONS -c save pop -f "$1"
+exec "$GS_EXECUTABLE" $OPTIONS -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pswrite "-sOutputFile=$outfile" $OPTIONS -c save pop -f "$1"

Modified: trunk/gs/lib/pdfopt
===================================================================
--- trunk/gs/lib/pdfopt	2007-07-05 18:12:59 UTC (rev 8106)
+++ trunk/gs/lib/pdfopt	2007-07-05 19:04:29 UTC (rev 8107)
@@ -5,6 +5,11 @@
 # This definition is changed on install to match the
 # executable name set in the makefile
 GS_EXECUTABLE=gs
+gs="`dirname $0`/$GS_EXECUTABLE"
+if test ! -x "$gs"; then
+	gs="$GS_EXECUTABLE"
+fi
+GS_EXECUTABLE="$gs"
 
 OPTIONS="-dSAFER -dDELAYSAFER"
 while true
@@ -21,4 +26,4 @@
 	exit 1
 fi
 
-exec $GS_EXECUTABLE -q -dNODISPLAY $OPTIONS -- pdfopt.ps "$1" "$2"
+exec "$GS_EXECUTABLE" -q -dNODISPLAY $OPTIONS -- pdfopt.ps "$1" "$2"

Modified: trunk/gs/lib/pf2afm
===================================================================
--- trunk/gs/lib/pf2afm	2007-07-05 18:12:59 UTC (rev 8106)
+++ trunk/gs/lib/pf2afm	2007-07-05 19:04:29 UTC (rev 8107)
@@ -8,5 +8,10 @@
 # This definition is changed on install to match the
 # executable name set in the makefile
 GS_EXECUTABLE=gs
+gs="`dirname $0`/$GS_EXECUTABLE"
+if test ! -x "$gs"; then
+	gs="$GS_EXECUTABLE"
+fi
+GS_EXECUTABLE="$gs"
 
-exec $GS_EXECUTABLE -q -dNODISPLAY -dSAFER -dDELAYSAFER  -- pf2afm.ps "$@"
+exec "$GS_EXECUTABLE" -q -dNODISPLAY -dSAFER -dDELAYSAFER  -- pf2afm.ps "$@"

Modified: trunk/gs/lib/pfbtopfa
===================================================================
--- trunk/gs/lib/pfbtopfa	2007-07-05 18:12:59 UTC (rev 8106)
+++ trunk/gs/lib/pfbtopfa	2007-07-05 19:04:29 UTC (rev 8107)
@@ -5,6 +5,11 @@
 # This definition is changed on install to match the
 # executable name set in the makefile
 GS_EXECUTABLE=gs
+gs="`dirname $0`/$GS_EXECUTABLE"
+if test ! -x "$gs"; then
+	gs="$GS_EXECUTABLE"
+fi
+GS_EXECUTABLE="$gs"
 
 if [ $# -eq 2 ] 
 then
@@ -17,4 +22,4 @@
     exit 1
 fi
 
-exec $GS_EXECUTABLE -q -dNODISPLAY -- pfbtopfa.ps "$1" "$outfile"
+exec "$GS_EXECUTABLE" -q -dNODISPLAY -- pfbtopfa.ps "$1" "$outfile"

Modified: trunk/gs/lib/pphs
===================================================================
--- trunk/gs/lib/pphs	2007-07-05 18:12:59 UTC (rev 8106)
+++ trunk/gs/lib/pphs	2007-07-05 19:04:29 UTC (rev 8107)
@@ -7,5 +7,10 @@
 # This definition is changed on install to match the
 # executable name set in the makefile
 GS_EXECUTABLE=gs
+gs="`dirname $0`/$GS_EXECUTABLE"
+if test ! -x "$gs"; then
+	gs="$GS_EXECUTABLE"
+fi
+GS_EXECUTABLE="$gs"
 
-exec $GS_EXECUTABLE -q -dNODISPLAY -- pphs.ps "$@"
+exec "$GS_EXECUTABLE" -q -dNODISPLAY -- pphs.ps "$@"

Modified: trunk/gs/lib/printafm
===================================================================
--- trunk/gs/lib/printafm	2007-07-05 18:12:59 UTC (rev 8106)
+++ trunk/gs/lib/printafm	2007-07-05 19:04:29 UTC (rev 8107)
@@ -4,4 +4,13 @@
 #	printafm fontname
 # Output goes to stdout.
 
-exec gs -q -dNODISPLAY -- printafm.ps "$@"
+# This definition is changed on install to match the
+# executable name set in the makefile
+GS_EXECUTABLE=gs
+gs="`dirname $0`/$GS_EXECUTABLE"
+if test ! -x "$gs"; then
+	gs="$GS_EXECUTABLE"
+fi
+GS_EXECUTABLE="$gs"
+
+exec "$GS_EXECUTABLE" -q -dNODISPLAY -- printafm.ps "$@"

Modified: trunk/gs/lib/ps2epsi
===================================================================
--- trunk/gs/lib/ps2epsi	2007-07-05 18:12:59 UTC (rev 8106)
+++ trunk/gs/lib/ps2epsi	2007-07-05 19:04:29 UTC (rev 8107)
@@ -4,6 +4,11 @@
 # This definition is changed on install to match the
 # executable name set in the makefile
 GS_EXECUTABLE=gs
+gs="`dirname $0`/$GS_EXECUTABLE"
+if test ! -x "$gs"; then
+	gs="$GS_EXECUTABLE"
+fi
+GS_EXECUTABLE="$gs"
 
 # try to create a temporary file securely
 if test -z "$TMPDIR"; then
@@ -70,7 +75,7 @@
 		}
 	' U="$USERNAME$LOGNAME"  F=1 - F=2 "${infile}" >"$tmpfile"
 
-$GS_EXECUTABLE -q -dNOPAUSE -dSAFER -dDELAYSAFER -r72 -sDEVICE=bit -sOutputFile=/dev/null "$tmpfile" ps2epsi.ps "$tmpfile" <"${infile}" 1>&2
+"$GS_EXECUTABLE" -q -dNOPAUSE -dSAFER -dDELAYSAFER -r72 -sDEVICE=bit -sOutputFile=/dev/null "$tmpfile" ps2epsi.ps "$tmpfile" <"${infile}" 1>&2
 rm -f "$tmpfile"
 rm -rf "$tmpdir"
 

Modified: trunk/gs/lib/ps2pdf
===================================================================
--- trunk/gs/lib/ps2pdf	2007-07-05 18:12:59 UTC (rev 8106)
+++ trunk/gs/lib/ps2pdf	2007-07-05 19:04:29 UTC (rev 8107)
@@ -4,4 +4,10 @@
 
 # Currently, we produce PDF 1.4 by default, but this is not guaranteed
 # not to change in the future.
-exec ps2pdf14 "$@"
+version=14
+
+ps2pdf="`dirname $0`/ps2pdf$version"
+if test ! -x "$ps2pdf"; then
+	ps2pdf="ps2pdf$version"
+fi
+exec "$ps2pdf" "$@"

Modified: trunk/gs/lib/ps2pdf12
===================================================================
--- trunk/gs/lib/ps2pdf12	2007-07-05 18:12:59 UTC (rev 8106)
+++ trunk/gs/lib/ps2pdf12	2007-07-05 19:04:29 UTC (rev 8107)
@@ -1,5 +1,8 @@
 #!/bin/sh
 # $Id$
 # Convert PostScript to PDF 1.2 (Acrobat 3-and-later compatible).
-
-exec ps2pdfwr -dCompatibilityLevel=1.2 "$@"
+ps2pdfwr="`dirname $0`/ps2pdfwr"
+if test ! -x "$ps2pdfwr"; then
+	ps2pdfwr="ps2pdfwr"
+fi
+exec "$ps2pdfwr" -dCompatibilityLevel=1.2 "$@"

Modified: trunk/gs/lib/ps2pdf13
===================================================================
--- trunk/gs/lib/ps2pdf13	2007-07-05 18:12:59 UTC (rev 8106)
+++ trunk/gs/lib/ps2pdf13	2007-07-05 19:04:29 UTC (rev 8107)
@@ -1,5 +1,8 @@
 #!/bin/sh
 # $Id$
 # Convert PostScript to PDF 1.3 (Acrobat 4-and-later compatible).
-
-exec ps2pdfwr -dCompatibilityLevel=1.3 "$@"
+ps2pdfwr="`dirname $0`/ps2pdfwr"
+if test ! -x "$ps2pdfwr"; then
+	ps2pdfwr="ps2pdfwr"
+fi
+exec "$ps2pdfwr" -dCompatibilityLevel=1.3 "$@"

Modified: trunk/gs/lib/ps2pdf14
===================================================================
--- trunk/gs/lib/ps2pdf14	2007-07-05 18:12:59 UTC (rev 8106)
+++ trunk/gs/lib/ps2pdf14	2007-07-05 19:04:29 UTC (rev 8107)
@@ -1,5 +1,8 @@
 #!/bin/sh
 # $Id$
 # Convert PostScript to PDF 1.4 (Acrobat 5-and-later compatible).
-
-exec ps2pdfwr -dCompatibilityLevel=1.4 "$@"
+ps2pdfwr="`dirname $0`/ps2pdfwr"
+if test ! -x "$ps2pdfwr"; then
+	ps2pdfwr="ps2pdfwr"
+fi
+exec "$ps2pdfwr" -dCompatibilityLevel=1.4 "$@"

Modified: trunk/gs/lib/ps2pdfwr
===================================================================
--- trunk/gs/lib/ps2pdfwr	2007-07-05 18:12:59 UTC (rev 8106)
+++ trunk/gs/lib/ps2pdfwr	2007-07-05 19:04:29 UTC (rev 8107)
@@ -5,6 +5,11 @@
 # This definition is changed on install to match the
 # executable name set in the makefile
 GS_EXECUTABLE=gs
+gs="`dirname $0`/$GS_EXECUTABLE"
+if test ! -x "$gs"; then
+	gs="$GS_EXECUTABLE"
+fi
+GS_EXECUTABLE="$gs"
 
 OPTIONS="-dSAFER"
 while true
@@ -37,4 +42,4 @@
 
 # We have to include the options twice because -I only takes effect if it
 # appears before other options.
-exec $GS_EXECUTABLE $OPTIONS -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite "-sOutputFile=$outfile" $OPTIONS -c .setpdfwrite -f "$infile"
+exec "$GS_EXECUTABLE" $OPTIONS -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite "-sOutputFile=$outfile" $OPTIONS -c .setpdfwrite -f "$infile"

Modified: trunk/gs/lib/ps2ps
===================================================================
--- trunk/gs/lib/ps2ps	2007-07-05 18:12:59 UTC (rev 8106)
+++ trunk/gs/lib/ps2ps	2007-07-05 19:04:29 UTC (rev 8107)
@@ -5,6 +5,11 @@
 # This definition is changed on install to match the
 # executable name set in the makefile
 GS_EXECUTABLE=gs
+gs="`dirname $0`/$GS_EXECUTABLE"
+if test ! -x "$gs"; then
+	gs="$GS_EXECUTABLE"
+fi
+GS_EXECUTABLE="$gs"
 
 OPTIONS="-dSAFER"
 while true
@@ -22,4 +27,4 @@
 	exit 1
 fi
 
-exec $GS_EXECUTABLE -q -sDEVICE=pswrite "-sOutputFile=$2" -dNOPAUSE -dBATCH $OPTIONS "$1"
+exec "$GS_EXECUTABLE" -q -sDEVICE=pswrite "-sOutputFile=$2" -dNOPAUSE -dBATCH $OPTIONS "$1"

Modified: trunk/gs/lib/wftopfa
===================================================================
--- trunk/gs/lib/wftopfa	2007-07-05 18:12:59 UTC (rev 8106)
+++ trunk/gs/lib/wftopfa	2007-07-05 19:04:29 UTC (rev 8107)
@@ -4,5 +4,10 @@
 # This definition is changed on install to match the
 # executable name set in the makefile
 GS_EXECUTABLE=gs
+gs="`dirname $0`/$GS_EXECUTABLE"
+if test ! -x "$gs"; then
+	gs="$GS_EXECUTABLE"
+fi
+GS_EXECUTABLE="$gs"
 
-exec $GS_EXECUTABLE -q -dNODISPLAY -- wftopfa.ps "$@"
+exec "$GS_EXECUTABLE" -q -dNODISPLAY -- wftopfa.ps "$@"



More information about the gs-cvs mailing list