Modified the ant wrapper scripts to handle being passed -D arguments more
cleanly. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1236 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,24 +1,37 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# $Id: ant,v 1.1 2002/02/05 21:39:22 mdb Exp $
|
# $Id: ant,v 1.2 2002/04/14 01:32:21 mdb Exp $
|
||||||
#
|
#
|
||||||
# Invokes our desired version of ant with all of our jar files in the
|
# Invokes our desired version of ant with all of our jar files in the
|
||||||
# classpath.
|
# classpath.
|
||||||
|
|
||||||
BINDIR=`dirname $0`
|
BINDIR=`dirname $0`
|
||||||
ANT_OPTS="-Dbuild.compiler=jikes"
|
ANT_COMPILER="-Dbuild.compiler=jikes"
|
||||||
|
|
||||||
|
# process our arguments
|
||||||
|
while [ ! -z "$1" ]; do
|
||||||
|
case "$1" in
|
||||||
|
-Dbuild.compiler=*)
|
||||||
|
ANT_COMPILER="$1"
|
||||||
|
;;
|
||||||
|
-D*)
|
||||||
|
ANT_OPTS="$ANT_OPTS $1"
|
||||||
|
;;
|
||||||
|
-d)
|
||||||
|
ANT_OPTS="$ANT_OPTS -Dbuild.optimize=off"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
ARGS="$ARGS $1"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
# Load default settings from config file (if it exists)
|
# Load default settings from config file (if it exists)
|
||||||
if [ -f "$HOME/.antrc" ]; then
|
if [ -f "$HOME/.antrc" ]; then
|
||||||
. "$HOME/.antrc"
|
. "$HOME/.antrc"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# determine whether or not we want optimization off
|
|
||||||
if [ "$1" == "-d" ]; then
|
|
||||||
shift
|
|
||||||
ANT_OPTS="$ANT_OPTS -Dbuild.optimize=off"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# add all JAR files in JAVA_LIBS to CLASSPATH
|
# add all JAR files in JAVA_LIBS to CLASSPATH
|
||||||
SYSTEMCP=`echo $JAVA_LIBS/*.jar | tr ' ' ':'`
|
SYSTEMCP=`echo $JAVA_LIBS/*.jar | tr ' ' ':'`
|
||||||
|
|
||||||
@@ -35,5 +48,5 @@ else
|
|||||||
fi
|
fi
|
||||||
export CLASSPATH
|
export CLASSPATH
|
||||||
|
|
||||||
$JAVA_HOME/bin/java $ANT_OPTS -Dant.home=/usr/share/ant \
|
$JAVA_HOME/bin/java $ANT_COMPILER $ANT_OPTS -Dant.home=/usr/share/ant \
|
||||||
org.apache.tools.ant.Main $@
|
org.apache.tools.ant.Main $ARGS
|
||||||
|
|||||||
Reference in New Issue
Block a user