From 858d9bbefa2cc73be1aece1b3d840d7c7f34d10f Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Tue, 5 Feb 2002 21:39:22 +0000 Subject: [PATCH] Added a script for invoking our version of ant with our jars. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@934 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- bin/ant | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 bin/ant diff --git a/bin/ant b/bin/ant new file mode 100755 index 000000000..ae5ab6829 --- /dev/null +++ b/bin/ant @@ -0,0 +1,39 @@ +#!/bin/sh +# +# $Id: ant,v 1.1 2002/02/05 21:39:22 mdb Exp $ +# +# Invokes our desired version of ant with all of our jar files in the +# classpath. + +BINDIR=`dirname $0` +ANT_OPTS="-Dbuild.compiler=jikes" + +# Load default settings from config file (if it exists) +if [ -f "$HOME/.antrc" ]; then + . "$HOME/.antrc" +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 +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` + +if [ "$CLASSPATH" ] ; then + CLASSPATH="$PROJECTJAR:$PROJECTCP:$SYSTEMCP:$CLASSPATH" +else + CLASSPATH="$PROJECTJAR:$PROJECTCP:$SYSTEMCP" +fi +export CLASSPATH + +$JAVA_HOME/bin/java $ANT_OPTS -Dant.home=/usr/share/ant \ + org.apache.tools.ant.Main $@