#!/bin/sh -f

# Special settings to run MuPAD without any local modifications

MuPAD_ROOT_PATH=`dirname $0`/../..
export MuPAD_ROOT_PATH

SYSINFO=`$MuPAD_ROOT_PATH/share/bin/sysinfo`
MuPAD_BIN=$MuPAD_ROOT_PATH/$SYSINFO/bin

if test -n "$PATH" ; then
   PATH=$MuPAD_ROOT_PATH/share/bin:${MuPAD_BIN}:$PATH  
else
   PATH=$MuPAD_ROOT_PATH/share/bin:${MuPAD_BIN}
fi
export PATH

# This Bourne or Korn Shell script runs MuPAD with a TTY interface.

# These are the directories in which you installed MuPAD

# MuPAD_ROOT_PATH is the root directory of the MuPAD-System  
# MuPAD_BIN       is the directory of the MuPAD programms
# MuPAD_LIB       is the root directory of the MuPAD-Library
# MuPAD_HELP	  is the directory of the Help dependent stuff
# MuPAD_DYNMOD    is the directory of MuPAD moduls

MuPAD_LIB=$MuPAD_ROOT_PATH/share/lib
MuPAD_HELP=$MuPAD_ROOT_PATH/share/doc/ascii
MuPAD_DYNMOD=$MuPAD_ROOT_PATH/$SYSINFO/modules

# This ensures that MuPAD will find all of its modules.

$MuPAD_BIN/mupad -l $MuPAD_LIB -d $MuPAD_DYNMOD -h $MuPAD_HELP "$@"
