Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux: Fix handling of spaces in squeak.sh args #29

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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[@]}"