setup revision 0a99555401a033704f1f171baab6db11fb5528f2
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#!/bin/sh
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# The contents of this file are subject to the terms
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# of the Common Development and Distribution License
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# (the License). You may not use this file except in
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# compliance with the License.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# You can obtain a copy of the License at
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# https://opensso.dev.java.net/public/CDDLv1.0.html or
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# opensso/legal/CDDLv1.0.txt
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# See the License for the specific language governing
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# permission and limitations under the License.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# When distributing Covered Code, include this CDDL
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# Header Notice in each file and include the License file
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# at opensso/legal/CDDLv1.0.txt.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# If applicable, add the following below the CDDL Header,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# with the fields enclosed by brackets [] replaced by
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright# your own identifying information:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# "Portions Copyrighted [year] [name of copyright owner]"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw# $Id: setup,v 1.11 2009/01/28 05:34:46 ww203982 Exp $
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwif [ -z "${JAVA_HOME}" ]; then
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw echo "Please define JAVA_HOME environment variable before running this program"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw echo "setup program will use the JVM defined in JAVA_HOME for all the CLI tools"
bbf6f00c25b6a2bed23c35eac6d62998ecdb338cJordan Brown exit 1
bbf6f00c25b6a2bed23c35eac6d62998ecdb338cJordan Brownfi
7f667e74610492ddbce8ce60f52ece95d2401949jose borrego
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwif [ ! -x "$JAVA_HOME"/bin/java ]; then
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb echo "The defined JAVA_HOME environment variable is not correct"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw echo "setup program will use the JVM defined in JAVA_HOME for all the CLI tools"
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb exit 1
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwfi
2c2961f8403049d948b9f3e6c35d6488b6b7e1aajose borrego
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwAWK=`which awk`
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwif [ -z $AWK ]; then
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw echo "setup fails because awk is not found"
b89a8333f5e1f75ec0c269b22524bd2eccb972banatalie li - Sun Microsystems - Irvine United States exit 1
9fb67ea305c66b6a297583b9b0db6796b0dfe497afshin salek ardakani - Sun Microsystems - Irvine United Statesfi
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb
7f667e74610492ddbce8ce60f52ece95d2401949jose borregoJAVA_VER=`${JAVA_HOME}/bin/java -version 2>&1 | $AWK -F'"' '{print $2}'`
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwcase $JAVA_VER in
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb1.0* | 1.1* | 1.2* | 1.3*)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw echo "This program is designed to work with 1.4 or newer JRE."
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb exit 0
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ;;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbesac
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbif [ "$1" = "-h" -o "$1" = "--help" ] ; then
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw help_print=yes
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwfi
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwif [ "$1" = "-l" -o "$1" = "--log" ] ; then
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw path_log="$2"
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbfi
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbif [ "$1" = "-d" -o "$1" = "--debug" ] ; then
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb path_debug="$2"
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbfi
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbif [ "$1" = "-p" -o "$1" = "--path" ] ; then
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb path_AMConfig="$2"
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbfi
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbif [ "$3" = "-l" -o "$3" = "--log" ] ; then
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw path_log="$4"
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbfi
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbif [ "$3" = "-d" -o "$3" = "--debug" ] ; then
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb path_debug="$4"
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbfi
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbif [ "$3" = "-p" -o "$3" = "--path" ] ; then
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb path_AMConfig="$4"
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbfi
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbif [ "$5" = "-l" -o "$5" = "--log" ] ; then
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb path_log="$6"
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbfi
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbif [ "$5" = "-d" -o "$5" = "--debug" ] ; then
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb path_debug="$6"
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbfi
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbif [ "$5" = "-p" -o "$5" = "--path" ] ; then
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb path_AMConfig="$6"
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbfi
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb${JAVA_HOME}/bin/java -D"load.config=yes" -D"help.print=${help_print}" -D"path.AMConfig=${path_AMConfig}" -D"path.debug=${path_debug}" -D"path.log=${path_log}" -cp "lib/amserver.jar:lib/amadm_setup.jar:lib/opensso-sharedlib.jar:lib/OpenDJ.jar:resources" com.sun.identity.tools.bundles.Main
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb