]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Improve the invocation of cygpath for cygwin. This fixes bug
authorSimon Pepping <spepping@apache.org>
Fri, 13 Oct 2006 07:07:21 +0000 (07:07 +0000)
committerSimon Pepping <spepping@apache.org>
Fri, 13 Oct 2006 07:07:21 +0000 (07:07 +0000)
40583. Patch contributed by Mark C. Allman <mcallman at allmanpc dot
com>.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@463578 13f79535-47bb-0310-9956-ffa450edef68

fop

diff --git a/fop b/fop
index 54981f4101fc1e3b50e8d1dd0e014e732c66ef75..e12e98d7724f33d9876ca8214e2393f239e1e250 100755 (executable)
--- a/fop
+++ b/fop
@@ -115,6 +115,22 @@ if $cygwin ; then
     JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
 fi
 
+
+########################
+# Experimental code 
+########################
+
+if [ "$OS" = "Windows_NT" ] ; then
+    pathSepChar=";"
+else
+    pathSepChar=":"
+fi
+echo Path Sep Char set to ${pathSepChar}
+
+########################
+########################
+
+
 if [ -z "$JAVACMD" ] ; then
   if [ -n "$JAVA_HOME"  ] ; then
     if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
@@ -142,7 +158,7 @@ if [ -n "$CLASSPATH" ] ; then
 fi
 
 # add fop.jar, fop-sandbox and fop-hyph.jar, which reside in $FOP_HOME/build
-LOCALCLASSPATH=${FOP_HOME}/build/fop.jar:${FOP_HOME}/build/fop-sandbox.jar:${FOP_HOME}/build/fop-hyph.jar:$LOCALCLASSPATH
+LOCALCLASSPATH=${FOP_HOME}/build/fop.jar${pathSepChar}${FOP_HOME}/build/fop-sandbox.jar${pathSepChar}${FOP_HOME}/build/fop-hyph.jar${pathSepChar}$LOCALCLASSPATH
 
 # add in the dependency .jar files, which reside in $FOP_HOME/lib
 DIRLIBS=${FOP_HOME}/lib/*.jar
@@ -154,14 +170,14 @@ do
       if [ -z "$LOCALCLASSPATH" ] ; then
         LOCALCLASSPATH=$i
       else
-        LOCALCLASSPATH="$i":$LOCALCLASSPATH
+        LOCALCLASSPATH="$i"${pathSepChar}$LOCALCLASSPATH
       fi
     fi
 done
 
 # add in user-defined hyphenation JARs
 if [ -n "$FOP_HYPHENATION_PATH" ] ; then
-  LOCALCLASSPATH=$LOCALCLASSPATH:$FOP_HYPHENATION_PATH
+  LOCALCLASSPATH=$LOCALCLASSPATH${pathSepChar}$FOP_HYPHENATION_PATH
 fi
 
 # For Cygwin, switch paths to appropriate format before running java
@@ -184,6 +200,7 @@ if $cygwin; then
   fi
   CYGHOME=`cygpath --$format "$HOME"`
 fi
+echo local class path: $LOCALCLASSPATH
 
 # Show script help if requested
 if $show_help ; then