You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

bootstrap.sh 1.2 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #!/bin/sh
  2. # You will need to specify JAVA_HOME if compiling with 1.2 or later.
  3. ANT_HOME=.
  4. export ANT_HOME
  5. echo ... Bootstrapping Ant Distribution
  6. if test -f lib/ant.jar ; then
  7. rm lib/ant.jar
  8. fi
  9. LOCALCLASSPATH=`echo $ANT_HOME/lib/*.jar | tr ' ' ':'`
  10. if [ "$CLASSPATH" != "" ] ; then
  11. CLASSPATH=$CLASSPATH:$LOCALCLASSPATH
  12. else
  13. CLASSPATH=$LOCALCLASSPATH
  14. fi
  15. if test -f $JAVA_HOME/lib/tools.jar ; then
  16. CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar
  17. fi
  18. if test -f $JAVA_HOME/lib/classes.zip ; then
  19. CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/classes.zip
  20. fi
  21. TOOLS=src/main/org/apache/tools
  22. CLASSDIR=classes
  23. CLASSPATH=${CLASSPATH}:${CLASSDIR}:src/main
  24. export CLASSPATH
  25. mkdir -p ${CLASSDIR}
  26. echo ... Compiling Ant Classes
  27. javac -d ${CLASSDIR} ${TOOLS}/tar/*.java
  28. javac -d ${CLASSDIR} ${TOOLS}/ant/*.java
  29. javac -d ${CLASSDIR} ${TOOLS}/ant/taskdefs/*.java
  30. echo ... Copying Required Files
  31. cp src/main/org/apache/tools/ant/taskdefs/defaults.properties ${CLASSDIR}/org/apache/tools/ant/taskdefs
  32. echo ... Building Ant Distribution
  33. java org.apache.tools.ant.Main clean main bootstrap
  34. echo ... Cleaning Up Build Directories
  35. chmod +x bin/ant bin/antRun
  36. rm -rf ${CLASSDIR}
  37. echo ... Done Bootstrapping Ant Distribution