#!/bin/csh -f


#set echo

set m = `defaultscript.sh mathematica`

## -my in order to have the front end in local directory
    if ( "$1" == "-personal" || "$1" == "-my" ) then
    shift
    goto personal
    endif

#DEFAULT MATHEMATICA
set comm = "$m -nostderrWindow -font  -adobe-courier-bold-o-normal--18-180-75-75-m-110-iso8859-2 -geometry 850x800+60+60 $*"
    $comm &
    exit


personal:



echo ""
echo "WARNING: THIS IS A PERSONAL WRAPPER OF `basename $0` in `whoami`/bin/"
echo ""



if ( "$1" == "-4.1" ) then
shift
set m = "/afs/itp.tugraz.at/opt/mathematica/4.1/Executables/Linux/mathematica"
endif

if ( "$1" == "-4.2" ) then
shift
set m = "/afs/itp.tugraz.at/opt/mathematica/4.2/Executables/Linux/mathematica"
endif


set fenddir = ~/.Mathematica/FrontEnd

#if ( -e $fenddir/init.add.m ) then
#echo "for correct front end appending $fenddir/init.add.m"
#cat $fenddir/init.add.m >> $fenddir/init.m
#endif

set okfile = $fenddir/init.ok.m 
if ( -e $okfile ) then
echo "for correct front end copying $okfile"
cp $okfile $fenddir/init.m
endif


# see xlsfonts to find fonts
#-pureKeys
#set comm = "$m -nostderrWindow -font screen-bold18 $*"
#set comm = "$m -nostderrWindow -pureKeys -font  -adobe-courier-bold-o-normal--18-180-75-75-m-110-iso8859-2 -geometry 900x830+40+40 $*"
#set comm = "$m -pureKeys -font  -adobe-courier-bold-o-normal--18-180-75-75-m-110-iso8859-2 -geometry 900x830+40+40 $*"
#NO: -pureKeys not good for ALT-GR
#set comm = "$m -nostderrWindow -font  -adobe-courier-bold-o-normal--18-180-75-75-m-110-iso8859-2 -geometry 900x830+40+40 $*"
set comm = "$m -nostderrWindow -font  -adobe-courier-bold-o-normal--18-180-75-75-m-110-iso8859-2 -geometry 850x800+60+60 $*"
echo "mathematica renamed to"
echo "$comm"

##echo `pwd`

$comm &
