eb270593d1
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1350 542714f4-19e9-0310-aa3c-eee0fc999fb1
53 lines
1.2 KiB
Bash
Executable File
53 lines
1.2 KiB
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# $Id: ant,v 1.3 2002/05/08 23:04:07 shaper Exp $
|
|
#
|
|
# Invokes our desired version of ant with all of our jar files in the
|
|
# classpath.
|
|
|
|
BINDIR=`dirname $0`
|
|
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)
|
|
if [ -f "$HOME/.antrc" ]; then
|
|
. "$HOME/.antrc"
|
|
fi
|
|
|
|
# add all JAR files in JAVA_LIBS to CLASSPATH
|
|
SYSTEMCP=`echo $JAVA_LIBS/*.jar | tr ' ' ':'`
|
|
|
|
# add all JAR files in the project libraries directory to CLASSPATH
|
|
PROJECTCP=`echo $BINDIR/../lib/*.jar | tr ' ' ':'`
|
|
|
|
# also the project jar file
|
|
PROJECTJAR=`echo $BINDIR/../dist/*.jar | tr ' ' ':'`
|
|
|
|
if [ "$CLASSPATH" ] ; then
|
|
CLASSPATH="$PROJECTJAR:$PROJECTCP:$SYSTEMCP:$CLASSPATH"
|
|
else
|
|
CLASSPATH="$PROJECTJAR:$PROJECTCP:$SYSTEMCP"
|
|
fi
|
|
export CLASSPATH
|
|
|
|
$JAVA_HOME/bin/java $ANT_COMPILER $ANT_OPTS -Dant.home=/usr/share/ant \
|
|
org.apache.tools.ant.Main $ARGS
|