build revision e75c2484bff064fbbf51e92aed4f37b08e6427b7
5cd4555ad444fd391002ae32450572054369fd42Rob Austein#!/bin/sh
0af902c0df86a1ddfa54f68b4cf0fab7b469d4e7Mark Andrews
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# CDDL HEADER START
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson#
1124950b35ae05a12e804e670607fe5ba775cb4aTinderbox User# The contents of this file are subject to the terms of the
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# Common Development and Distribution License, Version 1.0 only
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson# (the "License"). You may not use this file except in compliance
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater# with the License.
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson#
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson# You can obtain a copy of the license at
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson# trunk/opends/resource/legal-notices/OpenDS.LICENSE
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# See the License for the specific language governing permissions
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# and limitations under the License.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# file and include the License file at
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson# add the following below this CDDL HEADER, with the fields enclosed
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews# information:
b5ad6dfea4cc3e7d1d322ac99f1e5a31096837c4Mark Andrews# Portions Copyright [yyyy] [name of copyright owner]
f202f2587b9ba4753afba49b796f599cc12b4d0fAndreas Gustafsson#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# CDDL HEADER END
1753d3c4d74241a847794f7e7cfd94cc79be6600Evan Hunt#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Copyright 2007-2008 Sun Microsystems, Inc.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Change to the location of this build script.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeincd `dirname $0`
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# See if JAVA_HOME is set. If not, then see if there is a java executable in
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# the path and try to figure it out.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinif test -z "${JAVA_HOME}"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinthen
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein JAVA_HOME=`java -cp ../../resource FindJavaHome`
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein if test -z "${JAVA_HOME}"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein then
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein echo "Please set JAVA_HOME to the root of a Java 5.0 installation."
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews exit 1
26e2a07a0b6a3b1eccef82ba31270d0c54ad4f06Mark Andrews else
c1a883f2e04d94e99c433b1f6cfd0c0338f4ed85Mark Andrews export JAVA_HOME
7b8b5e34b6daf793373580dfb095f56af5e918ceAutomatic Updater fi
d60212e03fbef1d3dd7f7eb05c0545cc373cb9fcAutomatic Updaterfi
4d42b714be10e6f163d23507e4e3a396a8ac0364Automatic Updater
0e27506ce3135f9bd49e12564ad0e15256135118Automatic UpdaterOPENDS_LIB=`cd ../../lib;pwd`
5c6b95ba1b2e35f8dd6b0a7f25aacba91fff3aa2Tinderbox UserANT_LIB=$OPENDS_LIB/mail.jar
1124950b35ae05a12e804e670607fe5ba775cb4aTinderbox UserANT_HOME=`cd ../..;pwd`/ext/ant
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinexport ANT_HOME
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinANT_OPTS="-Xmx1g"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinexport ANT_OPTS
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Execute the ant script and pass it any additional command-line arguments.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein$ANT_HOME/bin/ant -lib ${ANT_LIB} -f shared/ant/build.xml ${*}
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein