#!/bin/sh if [ -z "$reduce" ] then reduce="/opt/reduce" fi MACHINE="linux" lisp="psl" gnuplot="$reduce/wutil/$MACHINE" export reduce MACHINE lisp gnuplot if [ -n "$TEXMACS_REDUCE_PATH" ] then INTERFACE="commandline" elif [ "$1" == "-x" -o "$1" == "-X" ] then INTERFACE="Xr" shift elif [ -e "$reduce/redfront/redfront" -a `$reduce/util/isatty` != "0" ] then INTERFACE="redfront" else INTERFACE="commandline" fi if [ -n "$1" ] then MEMORY=`echo "$1" | sed -e 's/(m|M)/000000/' -e 's/(k|K)/000/'` else MEMORY="128000000" fi case "$INTERFACE" in "commandline") exec "$reduce/lisp/psl/$MACHINE/psl/bpsl" -td "$MEMORY" -f "$reduce/lisp/psl/$MACHINE/red/reduce.img";; "redfront") exec "$reduce/redfront/redfront" "$MEMORY";; "Xr") exec "$reduce/xr/bin/xr" esac