#!/bin/sh
# $Id: oasyspc 615 2010-09-30 15:49:42Z florenz@TU-BERLIN.DE $

SHELL=/bin/sh
export SHELL

if [ -z "$OCS" ]
then
  OCS=`expr $0 : '\(..*\)/bin/..*$'`
  export OCS
fi

if [ -z "$OCSOM" ]
then
  OCSOM=$OCS/lib/om
  export OCSOM
fi

if [ -z "$OCSPROJECT" ]
then
  OCSPROJECT=$OCSOM/specs/empty
  export OCSPROJECT
fi

if [ -z "$DOSFOP" ]
then
  DOSFOP=$OCS/dosfop
  export DOSFOP
fi

if [ -z "$OASYSBIN" ]
then
  OASYSBIN=$OCS/bin/oasyspcbin
  export OASYSBIN
fi

if [ -n "$OASYSGLOBALRC" ]
then
  echo "WARNING: your OASYSGLOBALRC variable is ignored"
fi
OASYSGLOBALRC=$OCS/lib/oasys/startup.oasyspc
export OASYSGLOBALRC

. $OCSOM/specs/ShSpecs.basic

OCSDIR=$OCS
export OCSDIR

if [ $# -ge 1 ]; then
    case $1 in
    -color|-colour)
	OPAL_COLOR=yes
	export OPAL_COLOR
	shift
	;;
    -no-color|-no-colour)
	OPAL_COLOR=no
	export OPAL_COLOR
	shift
	;;
    esac
fi

mkdir OCS 1>/dev/null 2>&1
exec $OASYSBIN -zpchecker -zdiagFile -zetaEnrichment -zforceUsedForAc $*
