#!/usr/bin/qsh
#
# //  DESCRIPTION:
# //      

. $(/usr/bin/dirname $0)/setupCmdLine

printUsage()
{
  echo "Usage: Either set WORKSPACE to the rapid deployment workspace directory "
  echo "or specify wrd -workspace <workspace name>"
}

PASSPARM=""

while [ $# -gt 0 ]; do
  case $1 in
        -help)
               printUsage
               exit 0
               ;;
        -?)
               printUsage
               exit 0
               ;;
        -workspace) shift
                    WORKSPACE="$1"
                    ;;
        *) PASSPARM="$PASSPARM $1"
            ;;
  esac
  shift
done

if [ -z "$WORKSPACE" ]; then
  printUsage
  exit 0
fi

CP=${ITP_LOC}/startup.jar
APPLICATION=com.ibm.ws.rapiddeploy.core.WRDExec

${JAVA_HOME}/bin/java ${JAVA_FLAGS} \
  -classpath ${CP} \
  org.eclipse.core.launcher.Main -noupdate -data ${WORKSPACE} -application ${APPLICATION} -launch ${PASSPARM}



