#!/bin/sh
#
#   Generate mcc script

cd $TARGET/Executables

cat - > $1/$2 <<.
#!/bin/sh
#
#   Mathematica 4 command file
#
#   (c) 1988 - 1998  Wolfram Research, Inc.

topdir=$TARGET
sysid=$1
bindir=\$topdir/AddOns/MathLink/DevelopersKits/\$sysid/CompilerAdditions

if [ ! -f \$bindir/mcc ]; then
   echo "MathLink Developer's Kit not found. Check that you have"
   echo "installed the MathLink Developer's kit for the system"
   echo "you are running on."
   exit
fi

exec \$bindir/mcc "\$@"
.

chmod 755 $1/$2

