2 # This is a wrapper script to let LyX/Cygwin use either a native Win32 or
3 # Cygwin version of epstopdf (coming with either teTeX or MikTeX).
5 # This script simply changes all input pathnames into Windows or Cygwin
6 # pathnames depending on which version of epstopdf is being used.
7 # If the pathnames contain spaces, either enclose them in double quotes
8 # or escape the spaces. For example:
9 # epstopdf --outfile="output file.pdf" "input file.eps"
10 # epstopdf --outfile=output\ file.pdf input\ file.eps
12 # 2007-02-15 Enrico Forestieri
13 # =======================================================================
15 # The program to call (This should be in the PATH)
18 # If no epstopdf.exe is in the PATH, hope we have the cygwin script
19 if [ "`which $prog 2>/dev/null`" = "" ]; then
20 prog=/usr/bin/epstopdf
26 while [ $# -gt 0 ] ; do
28 -*=*) opt=`echo "$1" | cut -d= -f1`
29 file=`echo "$1" | cut -d= -f2-`
30 file=`cygpath $flag -- "$file"`
31 prog="$prog $opt='\"$file\"'"
35 *) prog="$prog '`cygpath $flag -- "$1"`'"