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

build.sh 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #!/bin/sh
  2. # This file should be executable.
  3. echo
  4. echo "Fop Build System"
  5. echo "----------------"
  6. echo
  7. if [ "$JAVA_HOME" = "" ] ; then
  8. echo "ERROR: JAVA_HOME not found in your environment."
  9. echo
  10. echo "Please, set the JAVA_HOME variable in your environment to match the"
  11. echo "location of the Java Virtual Machine you want to use."
  12. exit 1
  13. fi
  14. # OS specific support. $var _must_ be set to either true or false.
  15. cygwin=false;
  16. case "`uname`" in
  17. CYGWIN*) cygwin=true ;;
  18. esac
  19. # For Cygwin, ensure paths are in UNIX format before anything is touched
  20. if $cygwin ; then
  21. [ -n "$JAVA_HOME" ] &&
  22. JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
  23. fi
  24. LIBDIR=lib
  25. LOCALCLASSPATH=$JAVA_HOME/lib/tools.jar
  26. LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip
  27. LOCALCLASSPATH=$LOCALCLASSPATH:$LIBDIR/ant-1.5.1.jar
  28. LOCALCLASSPATH=$LOCALCLASSPATH:$LIBDIR/xml-apis.jar
  29. LOCALCLASSPATH=$LOCALCLASSPATH:$LIBDIR/xercesImpl-2.2.1.jar
  30. LOCALCLASSPATH=$LOCALCLASSPATH:$LIBDIR/xalan-2.4.1.jar
  31. # antRun must be executable (can't do this in build.xml because Ant uses antRun
  32. # to do the chmod)
  33. chmod +rx $LIBDIR/bin/antRun
  34. ANT_HOME=$LIBDIR
  35. # For Cygwin, switch paths to Windows format before running java
  36. if $cygwin; then
  37. JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
  38. LOCALCLASSPATH=`cygpath --path --windows "$LOCALCLASSPATH"`
  39. fi
  40. echo
  41. echo Building with classpath $LOCALCLASSPATH
  42. echo Starting Ant...
  43. echo
  44. $JAVA_HOME/bin/java -Dant.home=$ANT_HOME -classpath "$LOCALCLASSPATH" org.apache.tools.ant.Main $*