#!/bin/sh
#
#  Mathematica 4 command file
#
#  Copyright 1988 - 1998  Wolfram Research, Inc.
#

topdir=/usr/local/mathematica
sysid=Solaris

PATH=$topdir/Executables/$sysid:$PATH
export PATH

XFILESEARCHPATH=$topdir/SystemFiles/FrontEnd/SystemResources/X/%N:/SystemFiles/FrontEnd/SystemResources/X/%T/%N%S
export XFILESEARCHPATH

havefonts=`xlsfonts -fn '-wri-*-*-*-*-*-*-*-*-*-*-*-*-*' 2>&1 | grep -c "wri"`

font=$topdir/SystemFiles/Fonts/Type1

[ $havefonts -lt 2 ] && xset fp+ $font

font=$topdir/SystemFiles/Fonts/X

[ $havefonts -lt 2 ] && xset fp+ $font

xset fp rehash

bindir=$topdir/SystemFiles/FrontEnd/Binaries/$sysid
if [ ! -f $bindir/Mathematica ] ; then
   echo "Mathematica front end executable"
   echo "$bindir/Mathematica"
   echo "not found. Your Mathematica installation may be incomplete"
   echo "or corrupted."
   exit
fi

exec $bindir/Mathematica -topDirectory $topdir "$@"

