From: Paul V. <pa...@vi...> - 2003-09-13 22:46:04
|
Hi all, > BTW: A build under Linux failed because bash choked on the newline > escapes followed by comment lines. Evidently it escaped the #'s too > and saw the subsequent '-----' as commands! When I removed the > in-between comment lines from my local copy, everything worked. Well, it turns out to be a documented bash thing: if a # is glued to the previous word, it is not considered to be a comment character, so e.g. echo hihihi # hahaha echoes "hihihi", but echo hihihi# hahaha echoes "hihihi# hahaha" The same principle is at work in build.sh. It can be fixed in several ways, but my proposition is to do it like this, because this makes build.sh and build.bat look more alike, and therefore more easily maintainable as a pair (I think): --- BEGIN build.sh --- #! /bin/sh if [ "$JAVA_HOME" == "" ] ; then echo " Error: The JAVA_HOME environment variable is not set." echo " You must set it to point at your JDK or JRE distribution," echo " e.g. JAVA_HOME=/usr/java/j2sdk" exit 1 fi # set up the classpath _CP_ : # ----- ant libraries: ------ _CP_=../../lib/ant.jar _CP_=$_CP_:../../lib/optional.jar # ----- saxon libraries: ------ _CP_=$_CP_:../../lib/saxon.jar # ----- FOP libraries: ------ _CP_=$_CP_:../../lib/fop.jar _CP_=$_CP_:../../lib/batik.jar _CP_=$_CP_:../../lib/avalon-framework-cvs-20020315.jar _CP_=$_CP_:../../lib _CP_=$_CP_:$JAVA_HOME/lib/tools.jar java -Xmx100000000 -showversion -classpath $_CP_ org.apache.tools.ant.Main $* --- END build.sh I have this in a working copy of my working copy now, and it does the job (also tested with JAVA_HOME empty of course). Greetings, Paul Vinkenoog |