forked from pluckyporcupine/fortress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathant
executable file
·54 lines (48 loc) · 1.84 KB
/
ant
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
################################################################################
# Copyright 2009 Sun Microsystems, Inc.,
# 4150 Network Circle, Santa Clara, California 95054, U.S.A.
# All rights reserved.
#
# U.S. Government Rights - Commercial software.
# Government users are subject to the Sun Microsystems, Inc. standard
# license agreement and applicable provisions of the FAR and its supplements.
#
# Use is subject to license terms.
#
# This distribution may include materials developed by third parties.
#
# Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered
# trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
################################################################################
#
# For NetBeans, you should not need to adjust anything to
# build and test Fortress.
#
# For Eclipse, workspace and ant builds should not require any
# adjustments, but to run tests using Ant within Eclipse, you
# will need to add junit.jar to
# build.xml -> Run As -> Ant Build... -> Classpath -> User Entries -> Add JARs...
#
find_ant(){
# Strip "." from the path, and look for ant.
# This avoids infinite regress if this is the first or only "ant" on the normal PATH.
export NODOTPATH="`echo "$PATH" | sed -e '1,$s/^[.]://g'`"
NODOTPATH="`echo "$NODOTPATH" | sed -e '1,$s/:[.]:/:/g'`"
NODOTPATH="`echo "$NODOTPATH" | sed -e '1,$s/:[.]$//g'`"
result="`(PATH="$NODOTPATH" which ant 2>/dev/null)`"
if [ -z "$result" ]; then
echo "Could not find ant. You need to install it. See http://ant.apache.org/ for details." >&2
exit 1
fi
echo $result
exit 0
}
ant_exec="`find_ant`"
n=$?
if [ $n -ne 0 ]; then
exit $n
fi
# Note that the scripts reference must export their symbols so that they are available below.
. ./antrc_suggested
"$ant_exec" -noclasspath "$@"