setup revision d40d1afdbd65115bc8d2f2c364e34b7eded62b2e
0N/A#!/bin/sh
2362N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
0N/A#
0N/A# Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
0N/A#
0N/A# The contents of this file are subject to the terms
2362N/A# of the Common Development and Distribution License
0N/A# (the License). You may not use this file except in
2362N/A# compliance with the License.
0N/A#
0N/A# You can obtain a copy of the License at
0N/A# https://opensso.dev.java.net/public/CDDLv1.0.html or
0N/A# opensso/legal/CDDLv1.0.txt
0N/A# See the License for the specific language governing
0N/A# permission and limitations under the License.
0N/A#
0N/A# When distributing Covered Code, include this CDDL
0N/A# Header Notice in each file and include the License file
0N/A# at opensso/legal/CDDLv1.0.txt.
0N/A# If applicable, add the following below the CDDL Header,
2362N/A# with the fields enclosed by brackets [] replaced by
2362N/A# your own identifying information:
2362N/A# "Portions Copyrighted [year] [name of copyright owner]"
0N/A#
0N/A# $Id: setup,v 1.11 2009/01/28 05:34:46 ww203982 Exp $
0N/A#
0N/A
0N/Aif [ -z "${JAVA_HOME}" ]; then
1696N/A echo "Please define JAVA_HOME environment variable before running this program"
0N/A echo "setup program will use the JVM defined in JAVA_HOME for all the CLI tools"
0N/A exit 1
0N/Afi
0N/A
0N/Aif [ ! -x "$JAVA_HOME"/bin/java ]; then
0N/A echo "The defined JAVA_HOME environment variable is not correct"
0N/A echo "setup program will use the JVM defined in JAVA_HOME for all the CLI tools"
0N/A exit 1
0N/Afi
0N/A
0N/AAWK=`which awk`
0N/Aif [ -z $AWK ]; then
0N/A echo "setup fails because awk is not found"
0N/A exit 1
0N/Afi
0N/A
0N/AJAVA_VER=`${JAVA_HOME}/bin/java -version 2>&1 | $AWK -F'"' '{print $2}'`
0N/A
0N/Acase $JAVA_VER in
0N/A1.0* | 1.1* | 1.2* | 1.3*)
0N/A echo "This program is designed to work with 1.4 or newer JRE."
0N/A exit 0
0N/A ;;
0N/Aesac
0N/A
0N/Aif [ "$1" = "-h" -o "$1" = "--help" ] ; then
0N/A help_print=yes
0N/Afi
0N/Aif [ "$1" = "-l" -o "$1" = "--log" ] ; then
0N/A path_log="$2"
0N/Afi
0N/Aif [ "$1" = "-d" -o "$1" = "--debug" ] ; then
0N/A path_debug="$2"
1696N/Afi
0N/Aif [ "$1" = "-p" -o "$1" = "--path" ] ; then
0N/A path_AMConfig="$2"
0N/Afi
0N/Aif [ "$3" = "-l" -o "$3" = "--log" ] ; then
0N/A path_log="$4"
0N/Afi
0N/Aif [ "$3" = "-d" -o "$3" = "--debug" ] ; then
0N/A path_debug="$4"
0N/Afi
0N/Aif [ "$3" = "-p" -o "$3" = "--path" ] ; then
0N/A path_AMConfig="$4"
0N/Afi
0N/Aif [ "$5" = "-l" -o "$5" = "--log" ] ; then
0N/A path_log="$6"
0N/Afi
0N/Aif [ "$5" = "-d" -o "$5" = "--debug" ] ; then
0N/A path_debug="$6"
0N/Afi
0N/Aif [ "$5" = "-p" -o "$5" = "--path" ] ; then
0N/A path_AMConfig="$6"
0N/Afi
0N/A
0N/ACLASSPATH=""
0N/ACLASSPATH="lib/openam-amamdsetup-10.1.0-SNAPSHOT.jar"
0N/ACLASSPATH="${CLASSPATH}:lib/OpenDJ-2012-20-02.jar"
0N/ACLASSPATH="${CLASSPATH}:lib/json-20090211.jar"
0N/ACLASSPATH="${CLASSPATH}:lib/xalan-2.7.1.jar"
0N/ACLASSPATH="${CLASSPATH}:lib/xercesImpl-2.10.0.jar"
0N/ACLASSPATH="${CLASSPATH}:lib/xml-apis-1.4.01.jar"
0N/ACLASSPATH="${CLASSPATH}:lib/xmlsec-1.3.0.jar"
0N/ACLASSPATH="${CLASSPATH}:lib/openam-core-10.1.0-SNAPSHOT.jar"
0N/ACLASSPATH="${CLASSPATH}:lib/openam-shared-10.1.0-SNAPSHOT.jar"
0N/ACLASSPATH="${CLASSPATH}:lib/openam-dtd-schema-10.1.0-SNAPSHOT.jar"
0N/ACLASSPATH="${CLASSPATH}:lib/openam-rest-10.1.0-SNAPSHOT.jar"
0N/ACLASSPATH="${CLASSPATH}:resources"
0N/A
0N/A${JAVA_HOME}/bin/java -D"load.config=yes" -D"help.print=${help_print}" \
0N/A -D"path.AMConfig=${path_AMConfig}" -D"path.debug=${path_debug}" \
0N/A -D"path.log=${path_log}" \
0N/A -cp "${CLASSPATH}" \
0N/A com.sun.identity.tools.bundles.Main
0N/A