| 1 | #!/bin/bash |
|---|
| 2 | |
|---|
| 3 | ################################################################################ |
|---|
| 4 | # Copyright 2007 Sun Microsystems, Inc., |
|---|
| 5 | # 4150 Network Circle, Santa Clara, California 95054, U.S.A. |
|---|
| 6 | # All rights reserved. |
|---|
| 7 | # |
|---|
| 8 | # U.S. Government Rights - Commercial software. |
|---|
| 9 | # Government users are subject to the Sun Microsystems, Inc. standard |
|---|
| 10 | # license agreement and applicable provisions of the FAR and its supplements. |
|---|
| 11 | # |
|---|
| 12 | # Use is subject to license terms. |
|---|
| 13 | # |
|---|
| 14 | # This distribution may include materials developed by third parties. |
|---|
| 15 | # |
|---|
| 16 | # Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered |
|---|
| 17 | # trademarks of Sun Microsystems, Inc. in the U.S. and other countries. |
|---|
| 18 | ################################################################################ |
|---|
| 19 | |
|---|
| 20 | if [ "$ANT_HOME" == "" ] ; then |
|---|
| 21 | export TMPDIR="$$".tmpdir |
|---|
| 22 | mkdir /tmp/$TMPDIR |
|---|
| 23 | |
|---|
| 24 | ANT_HOME=`(cd /tmp/$TMPDIR; ant -diagnostics | sed -n -e 's/^ant\.home: //p' | head -1)` |
|---|
| 25 | |
|---|
| 26 | rmdir /tmp/$TMPDIR |
|---|
| 27 | |
|---|
| 28 | echo please set ANT_HOME, guessing $ANT_HOME |
|---|
| 29 | else |
|---|
| 30 | echo ANT_HOME is $ANT_HOME |
|---|
| 31 | fi |
|---|
| 32 | |
|---|
| 33 | # |
|---|
| 34 | # For NetBeans, you should not need to adjust anything to |
|---|
| 35 | # build and test Fortress. |
|---|
| 36 | # |
|---|
| 37 | # For Eclipse, workspace and ant builds should not require any |
|---|
| 38 | # adjustments, but to run tests using ant within Eclipse, you |
|---|
| 39 | # will need to add junit.jar to |
|---|
| 40 | # build.xml -> Run As -> Ant Build... -> Classpath -> User Entries -> Add JARs... |
|---|
| 41 | # |
|---|
| 42 | $ANT_HOME/bin/ant -noclasspath -lib third_party/junit "$@" |
|---|