Skip to content

Commit

Permalink
Merge pull request #29 from LinqLover/fix-squeak.sh-stargs
Browse files Browse the repository at this point in the history
linux: Fix handling of spaces in `squeak.sh` args
  • Loading branch information
marceltaeumel authored Apr 28, 2022
2 parents 28d3ee9 + 9041c9d commit 614c538
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions templates/linux/squeak.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ fi

VM="${BINDIR}/${APP}"
VMOPTIONS="-encoding UTF-8"
STARGS=
STARGS=()

# separate vm and script arguments
while [[ -n "$1" ]] ; do
case "$1" in
*.image) break;;
*.st|*.cs) STARGS="${STARGS} $1";;
*.st|*.cs) STARGS+=("$1");;
--) break;;
*) VMARGS="${VMARGS} $1";;
esac
Expand All @@ -64,7 +64,7 @@ done
while [[ -n "$1" ]]; do
case "$1" in
*.image) IMAGE="$1";;
*) STARGS="${STARGS} $1" ;;
*) STARGS+=("$1");;
esac
shift
done
Expand Down Expand Up @@ -170,4 +170,4 @@ ensure_image
detect_sound

echo "Using ${VM} ..."
exec ${SOUNDSERVER} "${VM}" ${VMOPTIONS} ${VMARGS} "${IMAGE}" ${STARGS}
exec ${SOUNDSERVER} "${VM}" ${VMOPTIONS} ${VMARGS} "${IMAGE}" "${STARGS[@]}"

0 comments on commit 614c538

Please sign in to comment.