1
0
mirror of synced 2026-01-13 15:37:38 +00:00

Update run-medley

- Pass through args correctly
- Help text that matches (more or less) the available params
- Add --dimensions to make setting screen size and geometry straightforward
This commit is contained in:
Abe Jellinek 2020-12-02 13:32:01 -08:00
parent ec4f57461c
commit 3aaa8c9837

View File

@ -1,10 +1,12 @@
#!/bin/sh
# Run Medley
#
# Syntax: run-medley [--geometry WIDTHxHEIGHT] \
# [--display X_DISPLAY] \
# [--vmfile FILE] \
# [--nogreet | --greet FILE] \
# Syntax: run-medley [--dimensions WIDTHxHEIGHT] \ # equivalent to -g WxH -sc WxH
# [-g WIDTHxHEIGHT] \
# [-sc WIDTHxHEIGHT] \
# [--display X_DISPLAY] \
# [--vmem | --vmfile FILE] \
# [--nogreet | --greet FILE] \
# [URL_OR_FILE]
# Directory variables are accessible from Lisp via UNIX-GETENV
@ -49,35 +51,40 @@ while [ "$#" -ne 0 ]; do
export LDEINIT="$2"
shift
;;
"--dimensions" | "-dimensions")
geometry="-g $2"
screensize="-sc $2"
shift
;;
"--geometry" | "-geometry" | "-g")
geometry="-g $2"
shift
;;
"--screensize" | "-screensize" | "-sc")
screensize = "-sc $2"
shift
;;
"--screensize" | "-screensize" | "-sc")
screensize = "-sc $2"
shift
;;
"--display" | "-d")
export DISPLAY="$2"
shift
;;
"-vmem" | "--vmem" | "-vmfile" )
export LDEDESTSYSOUT="$2"
shift
;;
"-full")
export LDESRCESYSOUT="$MEDLEYDIR/loadups/xfull35.sysout"
;;
"-lisp")
export LDESRCESYSOUT="$MEDLEYDIR/loadups/xlisp.sysout"
;;
"-*")
passthrough_args="$passthrough_args $1 $2"
echo unrecognized option, passthru "$1" "$2"
"-vmem" | "--vmem" | "-vmfile" )
export LDEDESTSYSOUT="$2"
shift
;;
;;
"-full")
export LDESRCESYSOUT="$MEDLEYDIR/loadups/xfull35.sysout"
;;
"-lisp")
export LDESRCESYSOUT="$MEDLEYDIR/loadups/xlisp.sysout"
;;
"-*")
passthrough_args="$passthrough_args $1 $2"
echo passing through unrecognized option: "$1" "$2"
shift
;;
*)
export LDESRCESYSOUT="$1"
export LDESRCESYSOUT="$1"
;;
esac
shift
@ -87,16 +94,16 @@ done
if [ -z "$LDESRCESYSOUT" ] ; then
if [ -f "$LDEDESTSYSOUT" ] ; then
export LDESRCESYSOUT="$LDEDESTSYSOUT"
export LDESRCESYSOUT="$LDEDESTSYSOUT"
else
export LDESRCESYSOUT="$MEDLEYDIR/loadups/xfull35.sysout" ;
export LDESRCESYSOUT="$MEDLEYDIR/loadups/xfull35.sysout"
fi
fi
case "$LDESRCSYSOUT" in
"http:*" | "https:*")
echo URL not supported yet
exit 1
echo URL not supported yet
exit 1
esac
inferred_maikodir=false
@ -135,6 +142,6 @@ echo "start $LDEINIT"
export INMEDLEY=1
$prog $geometry $screensize -t "Medley Interlisp" "$LDESRCESYSOUT"
$prog $geometry $screensize -t "Medley Interlisp" $passthrough_args "$LDESRCESYSOUT"