#!/bin/sh

#
# Copyright 1997-2007 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#

DIRNAME=`dirname $0`
CONFIG_HOME=${DIRNAME}/../config
. "${CONFIG_HOME}/asenv.conf"

# override relative path from asenv.conf
AS_INSTALL=${DIRNAME}/..
AS_INSTALL_LIB=$AS_INSTALL/lib
AS_INSTALL_MOD=$AS_INSTALL/modules
LD_LIBRARY_PATH="$AS_INSTALL/lib":"$LD_LIBRARY_PATH";export LD_LIBRARY_PATH

AS_JAVA=${JAVA_HOME}

# note: $AS_DEF_DOMAINS_PATH is relative to config dir
"${AS_JAVA}/bin/java" -Dcom.sun.aas.domainRoot="${DIRNAME}/$AS_DEF_DOMAINS_PATH" -Dcom.sun.aas.java.home="$AS_JAVA"  -jar "$AS_INSTALL_MOD/upgrade-tool.jar" "$@"
