#!/bin/sh
#
# @(#)$Id: rgenie.in 3721 1998-06-01 15:19:34Z faa $
#
# rgenie.  Generated from rgenie.in by configure.
#
# rgenie [gcl initialisation file] [tcl initialisation file] [smalltalk image] [default directory] [display]
#
# starts GENIE in an xterm - for use with rexec etc.
#
MAJOR=2
MINOR=2
prefix=/home/faa59/GENIE/installroot/usr/local
exec_prefix=${prefix}
BINDIR=${exec_prefix}/bin       # where genie executables are to be found

# limited option parsing - should only be -B
case $1 in 
    -*)
	OPTS="$OPTS $1"
	shift
	;;
    *)
	;;
esac

[ ! -z "$4" ] && { GENIE_DEFAULT="$4"; export GENIE_DEFAULT; }
[ ! -z "$5" ] && { DISPLAY="$5"; export DISPLAY; }

#
# look for "dxterm"
#
[ -f /usr/bin/X11/dxterm ] && DXTERM="/usr/bin/X11/dxterm"
[ ! -z "$DXTERM" ] && \
    { $DXTERM -sb -xrm "DXterm*columns: 132" -title "Open GENIE ${MAJOR}.${MINOR}" -e ${BINDIR}/genie $OPTS "$1" "$2"; exit; }
#
# look for "xterm"
#
[ -f /usr/bin/xterm ] && XTERM=/usr/bin/xterm
[ -f /usr/local/bin/xterm ] && XTERM=/usr/local/bin/xterm
[ -f /usr/X11/bin/xterm ] && XTERM=/usr/X11/bin/xterm
[ -f /usr/bin/X11/xterm ] && XTERM=/usr/bin/X11/xterm
[ ! -z "$XTERM" ] && \
    { $XTERM -geometry 132x24 -sb -xrm "*title: Open GENIE ${MAJOR}.${MINOR}" -xrm "*iconName: GENIE" -e ${BINDIR}/genie $OPTS "$1" "$2"; exit; }
#
