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

run-medley: quote our variables for safety.

This commit is contained in:
Abe Jellinek 2020-11-23 18:59:28 -08:00
parent f78657b173
commit c9c0113258

View File

@ -13,11 +13,11 @@ inferred_medleydir=false
if [ -z "$MEDLEYDIR" ] ; then
# the user is usually running this script from medley/, so let's try that
export MEDLEYDIR=`pwd`
export MEDLEYDIR="`pwd`"
inferred_medleydir=true
fi
if [ ! -d $MEDLEYDIR/loadups ] ; then
if [ ! -d "$MEDLEYDIR/loadups" ] ; then
echo "MEDLEYDIR has no loadups: $MEDLEYDIR"
if [ inferred_medleydir = true ] ; then
echo "I tried to infer it based on your working directory, but that didn't work."
@ -38,7 +38,7 @@ if [ -z "$MAIKODIR" ] ; then
inferred_maikodir=true
fi
if [ ! -d "$MAIKODIR"/bin ] ; then
if [ ! -d "$MAIKODIR/bin" ] ; then
echo "MAIKODIR has no bin: $MAIKODIR"
if [ inferred_maikodir = true ] ; then
echo "I tried to infer it based on your working directory, but that didn't work."
@ -68,15 +68,15 @@ while [ "$#" -ne 0 ]; do
shift
;;
"--display")
export DISPLAY=$2
export DISPLAY="$2"
shift
;;
"--save")
export LDEDESTSYSOUT=$2
export LDEDESTSYSOUT="$2"
shift
;;
"--load")
export LDESRCESYSOUT=$2
export LDESRCESYSOUT="$2"
shift
;;
*)
@ -91,10 +91,10 @@ if [ -z "$LDESRCESYSOUT" ] ; then
export LDESRCESYSOUT="$MEDLEYDIR/loadups/xfull35.sysout"
fi
echo "keyboard type is" $LDEKBDTYPE
echo "keyboard type is $LDEKBDTYPE"
export INMEDLEY=1
echo "sysout is" $LDESRCESYSOUT
echo "sysout is $LDESRCESYSOUT"
#version = `medley-lisp-version $LDESRCESYSOUT`
version="35010"
@ -109,10 +109,10 @@ case "$version" in
esac
echo "using emulator version $version"
export PATH=.:"$PATH"
export PATH=".:$PATH"
old_wd=`pwd`
cd "$MAIKODIR"/bin
export PATH=$MAIKODIR/`osversion`.`machinetype`:"$PATH"
cd $old_wd
cd "$MAIKODIR/bin"
export PATH="$MAIKODIR/`osversion`.`machinetype`:$PATH"
cd "$old_wd"
$prog $mem $geometry $passthrough_args