1
0
mirror of synced 2026-04-16 08:56:12 +00:00
Files
Interlisp.medley/run-medley
2020-11-26 21:21:57 -08:00

111 lines
2.2 KiB
Bash
Executable File

#!/bin/sh
# Run Medley
#
# Syntax: run-medley [options] [sysout name]
# Options
# -nogreet ; just run sysout
# -greet greetfile ; which greetfile to use
# -geometry pixelgeometry
# -screensize pixelgeometry
# -display xdisplay-device e.g. :0
# -vmem savevmemfilename
# current limits the size of the screen to
# 65536*32 bits so 1600x1200 will do
#
# Environment variables set
# Directory variables are accessible from Lisp via UNIX-GETENV
# LDESRCESYSOUT SYSOUT full-file name you want to run
# LDESOURCESYSOUT
# LDEDESTSYSOUT name for destination of SAVEVM/LOGOUT
# MEDLEYDIR
if [ -z "$MEDLEYDIR" ] ; then export MEDLEYDIR=`pwd`; fi
if [ ! -d $MEDLEYDIR/loadups ] ; then
echo MEDLEYDIR not found: "$MEDLEYDIR"
exit 1
fi
if [ -z "$MAIKODIR" ] ; then
export MAIKODIR="$MEDLEYDIR/../maiko"
if [ ! -d "$MAIKODIR"/bin ] ; then
echo "MAIKODIR not found: $MAIKODIR"
exit 1
fi
fi
geometry="-g 1440x900"
screensize="-sc 1440x900"
export LDEINIT="$MEDLEYDIR/greetfiles/SIMPLE-INIT"
export LDEKBDTYPE=x
export LDEDESTSYSOUT=~/lisp.virtualmem
while [ "$#" -ne 0 ]; do
case "$1" in
"-nogreet")
export LDEINIT=""
;;
"-greet")
export LDEINIT="$2"
shift
;;
"-geometry")
geometry="-g $2"
shift
;;
"-screensize")
screensize="-sc $2"
shift
;;
"-display")
export DISPLAY=$2
shift
;;
"-vmem")
LDEDESTSYSOUT=$2
shift
;;
"-"*)
echo unrecognized option "$1"
exit 1
;;
*)
# not an option so must be a sysout name
export LDESRCESYSOUT=$1
;;
esac
shift
done
if [ -z "$LDESRCESYSOUT" ] ; then
if [ -f "$LDEDESTSYSOUT" ] ; then
export LDESRCESYSOUT="$LDEDESTSYSOUT"
fi
else
export LDESRCSYSOUT="$MEDLEYDIR/loadups/xfull35.sysout" ;
fi
export INMEDLEY=1
echo "sysout is " $LDESRCESYSOUT
prog="lde"
oldpath="$PATH"
export PATH=.:"$PATH"
cd "$MAIKODIR"/bin
export PATH=$MAIKODIR/`osversion`.`machinetype`:"$oldpath"
cd $old_wd
$prog $geometry $screensize -t "Medley Interlisp @ https://Interlisp.org"