| 20 | | # |
| 21 | | # For NetBeans, you should not need to adjust anything to |
| 22 | | # build and test Fortress. |
| 23 | | # |
| 24 | | # For Eclipse, workspace and ant builds should not require any |
| 25 | | # adjustments, but to run tests using Ant within Eclipse, you |
| 26 | | # will need to add junit.jar to |
| 27 | | # build.xml -> Run As -> Ant Build... -> Classpath -> User Entries -> Add JARs... |
| 28 | | # |
| 29 | | |
| 30 | | find_ant(){ |
| 31 | | # Strip "." from the path, and look for ant. |
| 32 | | # This avoids infinite regress if this is the first or only "ant" on the normal PATH. |
| 33 | | export NODOTPATH="`echo "$PATH" | sed -e '1,$s/^[.]://g'`" |
| 34 | | NODOTPATH="`echo "$NODOTPATH" | sed -e '1,$s/:[.]:/:/g'`" |
| 35 | | NODOTPATH="`echo "$NODOTPATH" | sed -e '1,$s/:[.]$//g'`" |
| 36 | | result="`(PATH="$NODOTPATH" which ant 2>/dev/null)`" |
| 37 | | if [ -z "$result" ]; then |
| 38 | | echo "Could not find ant. You need to install it. See http://ant.apache.org/ for details." >&2 |
| 39 | | exit 1 |
| 40 | | fi |
| 41 | | echo $result |
| 42 | | exit 0 |
| 43 | | } |
| 44 | | |
| 45 | | ant_exec="`find_ant`" |
| 46 | | n=$? |
| 47 | | if [ $n -ne 0 ]; then |
| 48 | | exit $n |
| 49 | | fi |
| 50 | | |
| 51 | | # Note that the scripts reference must export their symbols so that they are available below. |
| 52 | | . ../antrc_suggested |
| 53 | | |
| 54 | | "$ant_exec" -noclasspath "$@" |
| | 20 | cd .. |
| | 21 | exec ./ant "$@" |