setup revision 79943d71bcf8d4933e74f29a1b0e87f8898508cb
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
#
# Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
#
# The contents of this file are subject to the terms
# of the Common Development and Distribution License
# (the License). You may not use this file except in
# compliance with the License.
#
# You can obtain a copy of the License at
# See the License for the specific language governing
# permission and limitations under the License.
#
# When distributing Covered Code, include this CDDL
# Header Notice in each file and include the License file
# at opensso/legal/CDDLv1.0.txt.
# If applicable, add the following below the CDDL Header,
# with the fields enclosed by brackets [] replaced by
# your own identifying information:
# "Portions Copyrighted [year] [name of copyright owner]"
#
# $Id: setup,v 1.11 2009/01/28 05:34:46 ww203982 Exp $
#
if [ -z "$JAVA_HOME" ]; then
echo "Please define JAVA_HOME environment variable before running this program"
echo "setup program will use the JVM defined in JAVA_HOME for all the CLI tools"
exit 1
fi
echo "The defined JAVA_HOME environment variable is not correct"
echo "setup program will use the JVM defined in JAVA_HOME for all the CLI tools"
exit 1
fi
if [ -z $AWK ]; then
echo "setup fails because awk is not found"
exit 1
fi
1.0* | 1.1* | 1.2* | 1.3*)
echo "This program is designed to work with 1.4 or newer JRE."
exit 0
;;
esac
if [ "$1" = "-h" -o "$1" = "--help" ] ; then
fi
if [ "$1" = "-l" -o "$1" = "--log" ] ; then
path_log="$2"
fi
if [ "$1" = "-d" -o "$1" = "--debug" ] ; then
path_debug="$2"
fi
if [ "$1" = "-p" -o "$1" = "--path" ] ; then
path_AMConfig="$2"
fi
if [ "$3" = "-l" -o "$3" = "--log" ] ; then
path_log="$4"
fi
if [ "$3" = "-d" -o "$3" = "--debug" ] ; then
path_debug="$4"
fi
if [ "$3" = "-p" -o "$3" = "--path" ] ; then
path_AMConfig="$4"
fi
if [ "$5" = "-l" -o "$5" = "--log" ] ; then
path_log="$6"
fi
if [ "$5" = "-d" -o "$5" = "--debug" ] ; then
path_debug="$6"
fi
if [ "$5" = "-p" -o "$5" = "--path" ] ; then
path_AMConfig="$6"
fi
CLASSPATH=""
CLASSPATH="$CLASSPATH:lib/openam-core-${project.version}.jar"
CLASSPATH="$CLASSPATH:lib/openam-shared-${project.version}.jar"
CLASSPATH="$CLASSPATH:lib/openam-rest-${project.version}.jar"
CLASSPATH="$CLASSPATH:resources"
-D"path.AMConfig=$path_AMConfig" -D"path.debug=$path_debug" \
-cp "$CLASSPATH" \