setup revision a3d3ab94806056d2355afea6fe8daac41059b9fb
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater#!/bin/sh
c92c50783e4e93699f2a42643b8f200b9b719c87Automatic Updater#
bef75d63d74f58abc0f834ed271526672777ba29Automatic Updater# CDDL HEADER START
bef75d63d74f58abc0f834ed271526672777ba29Automatic Updater#
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater# The contents of this file are subject to the terms of the
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater# Common Development and Distribution License, Version 1.0 only
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater# (the "License"). You may not use this file except in compliance
bef75d63d74f58abc0f834ed271526672777ba29Automatic Updater# with the License.
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater#
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater# You can obtain a copy of the license at
bef75d63d74f58abc0f834ed271526672777ba29Automatic Updater# trunk/opends/resource/legal-notices/OpenDS.LICENSE
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater# See the License for the specific language governing permissions
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater# and limitations under the License.
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater#
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater# When distributing Covered Code, include this CDDL HEADER in each
ea94d370123a5892f6c47a97f21d1b28d44bb168Tinderbox User# file and include the License file at
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater# add the following below this CDDL HEADER, with the fields enclosed
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater# by brackets "[]" replaced with your own identifying information:
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater# Portions Copyright [yyyy] [name of copyright owner]
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater#
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater# CDDL HEADER END
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater#
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater#
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater# Copyright 2006-2008 Sun Microsystems, Inc.
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater# Capture the current working directory so that we can change to it later.
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater# Then capture the location of this script and the Directory Server instance
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater# root so that we can use them to create appropriate paths.
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic UpdaterWORKING_DIR=`pwd`
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updatercd `dirname "${0}"`
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic UpdaterSCRIPT_DIR=`pwd`
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic UpdaterINSTANCE_ROOT=${SCRIPT_DIR}
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updaterexport INSTANCE_ROOT
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic UpdaterSCRIPT_NAME=setup
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updaterexport SCRIPT_NAME
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updatercd "${WORKING_DIR}"
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater# Set environment variables
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic UpdaterSCRIPT_UTIL_CMD=set-full-environment-and-test-java
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updaterexport SCRIPT_UTIL_CMD
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater. "${INSTANCE_ROOT}/lib/_script-util.sh"
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic UpdaterRETURN_CODE=$?
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updaterif test ${RETURN_CODE} -ne 0
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updaterthen
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater exit ${RETURN_CODE}
ea94d370123a5892f6c47a97f21d1b28d44bb168Tinderbox Userfi
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater# Launch the setup process.
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater"${OPENDS_JAVA_BIN}" ${OPENDS_JAVA_ARGS} ${SCRIPT_NAME_ARG} org.opends.quicksetup.installer.SetupLauncher "${@}"
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater# return part
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic UpdaterRETURN_CODE=$?
ea94d370123a5892f6c47a97f21d1b28d44bb168Tinderbox Userif test ${RETURN_CODE} -eq 50
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updaterthen
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater # Version info was on requested
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater exit 0
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updaterelse
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater exit ${RETURN_CODE}
ea94d370123a5892f6c47a97f21d1b28d44bb168Tinderbox Userfi
fc2381b901eb162810f54a11cc512b95f55a60dfAutomatic Updater