#!/bin/sh

# program name:
PROGRAM=mod
VERSION=7v7

if test $# -lt 1
then
  echo usage: ${PROGRAM}${VERSION} script[.top]
  exit 1
fi

# These variables can be overridden in your .cshrc/.bashrc
if test -z "${EXECUTABLE_TYPE7v7}"; then EXECUTABLE_TYPE7v7=xxx; fi
if test -z "${MODINSTALL7v7}"; then MODINSTALL7v7=xxx; fi
if test -z "${LIBS_LIB7v7}"; then LIBS_LIB7v7=${MODINSTALL7v7}/modlib/libs.lib; fi
if test -z "${KEY_MODELLER7v7}"; then KEY_MODELLER7v7=xxx; fi

export MODINSTALL7v7 LIBS_LIB7v7 KEY_MODELLER7v7

# select the nice level:
NICE=
# NICE=nice -20

# executable:
EXECUTABLE=${PROGRAM}${VERSION}_${EXECUTABLE_TYPE7v7}

# input file:
STEERF=$1

# for IBM RS6000, to make the ERR keyword in I/O work:
cnverr=yes ; export cnverr

# to avoid running out of stack space
ulimit -S -s unlimited

# run the program:
exec $NICE ${MODINSTALL7v7}/bin/${EXECUTABLE} $STEERF
