#!/bin/bash

# Licensed Materials - Property of HCL*
# (c) Copyright HCL Technologies Ltd. 2020. All Rights Reserved.
#
# Note to U.S. Government Users Restricted Rights:
# Use, duplication or disclosure restricted by GSA ADP Schedule
# Contract with HCL Technologies Ltd.
#
# * Trademark of HCL Technologies Limited

PACC_LOCATION=`dirname "$0"`
PACC_PROGRAM=`basename "$0"`
if [ "$PACC_LOCATION" = "." ]; then
    PACC_LOCATION=`pwd`
fi

if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
  exec java \
    "-Dpacc.location=$PACC_LOCATION" \
    "-Dpacc.program=$PACC_PROGRAM" \
    -cp "$PACC_LOCATION/lib/paac-3.1.1175973.jar" \
    ucd.pacc.main.HelpMenu
  exit 0
fi

if [[ "$1" == -* ]]; then
  echo "Invalid argument: $1"
  echo "Use -h or --help for valid options."
  exit 1
fi

exec java \
  "-Dpacc.location=$PACC_LOCATION" \
  "-Dpacc.program=$PACC_PROGRAM" \
  -cp "$PACC_LOCATION/lib/paac-3.1.1175973.jar" \
  ucd.pacc.main.HelpMenu
exit 0

