root/trunk/ProjectFortress/ant @ 3532

Revision 3532, 1.9 KB (checked in by EricAllen, 9 months ago)

Added more error message quality tests.

  • Property svn:executable set to *
Line 
1#!/bin/bash
2
3################################################################################
4#    Copyright 2009 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#
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
30find_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
45ant_exec="`find_ant`"
46n=$?
47if [ $n -ne 0 ]; then
48        exit $n
49fi
50
51# Note that the scripts reference must export their symbols so that they are available below.
52pwd > tmp
53. ../antrc_suggested
54
55"$ant_exec" -noclasspath "$@"
Note: See TracBrowser for help on using the browser.