Tim Funk
Fri, 07 Oct 2005 04:36:29 -0700
Steps - Place the script in an empty directory. - Make sure ANT_HOME and JAVA_HOME are set - Make sure svn is in your path- Run the script and the svn checkout as well as the download and full build will be done.
Since there is a /current/ alias - is the 'ant update' task needed anymore? -Tim #!/bin/sh ############################################################################# # This is a quickie helper script to easily build tomcat 5 from source. # This will create a subdirectory called tc5build and build # tomcat 5 into it. # # Here are the requirements to get this to run # 1) Set JAVA_HOME to a 1.4 compliant JDK # ex: /opt/java1.4 # 2) Set ANT_HOME to your ant installation (You need ant 1.6 or better) # ex: /opt/jakarta/jakarta-ant-1.6 # 3) Make sure svn is in your path # 4) Make sure NetComponents.jar is installed in $ANT_HOME/lib # which can be found at http://www.savarese.org/oro/index.html # [Not sure if this step is still required for Ant to download things.] ############################################################################# ############################################################################# # Some help functions ############################################################################# TC_ECHO() { echo INFO: `date '+%H:%M:%S'` - $1 } TC_DOH() { echo ERROR: `date '+%H:%M:%S'` - $1 } ############################################################################# # cygwin - The UI of unix and the stability of windows. ############################################################################# cygwin=false case "`uname`" in CYGWIN*) cygwin=true;; esac ############################################################################# # Check for JAVA_HOME ############################################################################# if [ "Z" = "Z$JAVA_HOME" ] ; then TC_DOH "Where is JAVA_HOME!" exit 1 fi ############################################################################# # Check for ANT_HOME ############################################################################# if [ "Z" = "Z$ANT_HOME" ] ; then TC_DOH "Where is ANT_HOME! Please set it." exit 1 fi ############################################ # It seems like the environment is set ############################################ TC_ECHO "Using ANT_HOME=$ANT_HOME" TC_ECHO "Using JAVA_HOME=$JAVA_HOME" TC_ECHO "Putting everything in `pwd`/tc5build" TC_ECHO "Downloaded dependencies go into `pwd`/tc5build/includes" mkdir -p tc5build/includes if [ 0 != $? ]; then TC_DOH "Making subdir tc5build/includes failed!" exit 1 fi BASE_PATH=`pwd`/tc5build/includes if $cygwin; then BASE_PATH=`cygpath --path --mixed "$BASE_PATH"` fi cd tc5build TC_ECHO "Getting http://svn.apache.org/repos/asf/tomcat/current/tc5.5.x/" svn co http://svn.apache.org/repos/asf/tomcat/current/tc5.5.x/ if [ 0 != $? ]; then TC_DOH "Checkout failed. Hopefully there is a reason above." exit 1 fi cd tc5.5.x/build echo "base.path=$BASE_PATH" > build.properties ############################################ # Now do the build ############################################ TC_ECHO "Now performing the build" $ANT_HOME/bin/ant download deploy TC_ECHO "All done!" --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]