build revision 5666
7182N/A#!/bin/sh
7182N/A
7182N/A# CDDL HEADER START
7182N/A#
7182N/A# The contents of this file are subject to the terms of the
7182N/A# Common Development and Distribution License, Version 1.0 only
7182N/A# (the "License"). You may not use this file except in compliance
7182N/A# with the License.
7182N/A#
7182N/A# You can obtain a copy of the license at
7182N/A# trunk/opends/resource/legal-notices/OpenDS.LICENSE
7182N/A# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
7182N/A# See the License for the specific language governing permissions
7182N/A# and limitations under the License.
7182N/A#
7182N/A# When distributing Covered Code, include this CDDL HEADER in each
7182N/A# file and include the License file at
7182N/A# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
7182N/A# add the following below this CDDL HEADER, with the fields enclosed
7182N/A# information:
7182N/A# Portions Copyright [yyyy] [name of copyright owner]
7182N/A#
7182N/A# CDDL HEADER END
7182N/A#
7182N/A#
7182N/A# Copyright 2007-2008 Sun Microsystems, Inc.
7182N/A
7182N/A
7182N/A# Change to the location of this build script.
7182N/Acd `dirname $0`
7182N/A
7182N/A
7182N/A# See if JAVA_HOME is set. If not, then see if there is a java executable in
7182N/A# the path and try to figure it out.
7182N/Aif test -z "${JAVA_HOME}"
7182N/Athen
7182N/A JAVA_HOME=`java -cp ../../resource FindJavaHome`
7182N/A if test -z "${JAVA_HOME}"
7182N/A then
7182N/A echo "Please set JAVA_HOME to the root of a Java 5.0 installation."
7182N/A exit 1
7182N/A else
7182N/A export JAVA_HOME
7182N/A fi
7182N/Afi
7182N/A
7182N/AOPENDS_LIB=`cd ../../lib;pwd`
7182N/AANT_LIB=$OPENDS_LIB/mail.jar
7182N/AANT_HOME=`cd ../..;pwd`/ext/ant
7182N/Aexport ANT_HOME
7182N/AANT_OPTS="-Xmx1g"
7182N/Aexport ANT_OPTS
7182N/A# Execute the ant script and pass it any additional command-line arguments.
7182N/A$ANT_HOME/bin/ant -lib ${ANT_LIB} -f shared/ant/build.xml ${*}
7182N/A