#!/bin/ksh
#
# @(#)src/rmi-iiop/misc/sov/ibm_bin/rmic.ksh, orb, orb131, 20020222 1.1.1.1
#
#==============================================================================
# Licensed Materials - Property of IBM
# "Restricted Materials of IBM"
# IBM Java(tm)2 SDK, Standard Edition, v 1.4
#
# (C) Copyright IBM Corp. 2001, 2002. All Rights Reserved
#
#==============================================================================
#
# rmic script which uses the IBM back-end generators for -iiop and -idl
#

PRG=$(whence $0) >/dev/null 2>&1

# Resolve symbolic links
while [[ -L "$PRG" ]]
do
    src=$(/usr/bin/ls -l $PRG | /usr/bin/awk '{print $NF}')
    print $src | /usr/bin/grep -q '^/'
    if [[ $? = 1 ]]
    then
	PRG=${PRG%/*}/$src
    else
	PRG=$src
    fi
done
APPHOME=$(""cd ${PRG%/*}/..; /usr/bin/pwd)

# invoke rmic with the original options
$APPHOME/bin/rmic -J-classpath -J$APPHOME/lib/ibmtools.jar "$@"
