#!/bin/sh

# This Bourne or Korn Shell script runs MuPAD to rebuild
# the startup file startup.mb

# 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

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

MuPAD_BIN=$MuPAD_ROOT_PATH/$SYSINFO/bin
MuPAD_LIB=$MuPAD_ROOT_PATH/share/lib

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

echo "reading $MuPAD_LIB/.mupadsysinit"

echo "quit" | $MuPAD_BIN/mupad -i -l $MuPAD_LIB 1> /dev/null

echo "rebuild $MuPAD_BIN/startup.mb"
