fniephaus requested changes on this pull request.
@@ -53,4 +53,15 @@ case $PLATFORMLIBDIR in
/lib|/usr/lib) SVMLLP=/lib:/usr/lib;; *) SVMLLP="$PLATFORMLIBDIR:/lib:/usr$PLATFORMLIBDIR:/usr/lib" esac -LD_LIBRARY_PATH="$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}" exec $GDB "$BIN/squeak" "$@" + +# If no image file is provided as a command-line argument, allow the user to +# select the image file via a file-chooser dialog +if which zenity &>/dev/null && [ $# -eq 0 ]; then
Could you please swap left and right? No need to check if `zenity` is installed if there are more args anyway.
@@ -53,4 +53,15 @@ case $PLATFORMLIBDIR in
/lib|/usr/lib) SVMLLP=/lib:/usr/lib;; *) SVMLLP="$PLATFORMLIBDIR:/lib:/usr$PLATFORMLIBDIR:/usr/lib" esac -LD_LIBRARY_PATH="$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}" exec $GDB "$BIN/squeak" "$@" + +# If no image file is provided as a command-line argument, allow the user to +# select the image file via a file-chooser dialog +if which zenity &>/dev/null && [ $# -eq 0 ]; then + IMAGE=$(zenity --title 'Select an image' --file-selection --filename "${RESOURCES}/" --file-filter '*.image' --file-filter '*')
`IMAGE` is also used for all args (below), so please rename to something like `VM_ARGS`. Also, `${RESOURCES}` is not defined, maybe remove `--filename "${RESOURCES}/"`?
@@ -53,4 +53,15 @@ case $PLATFORMLIBDIR in
/lib|/usr/lib) SVMLLP=/lib:/usr/lib;; *) SVMLLP="$PLATFORMLIBDIR:/lib:/usr$PLATFORMLIBDIR:/usr/lib" esac -LD_LIBRARY_PATH="$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}" exec $GDB "$BIN/squeak" "$@" + +# If no image file is provided as a command-line argument, allow the user to +# select the image file via a file-chooser dialog +if which zenity &>/dev/null && [ $# -eq 0 ]; then + IMAGE=$(zenity --title 'Select an image' --file-selection --filename "${RESOURCES}/" --file-filter '*.image' --file-filter '*') +else + IMAGE=$@ +fi + +echo "Using image: ${IMAGE}"
Please remove this print message.
@@ -53,4 +53,15 @@ case $PLATFORMLIBDIR in
/lib|/usr/lib) SVMLLP=/lib:/usr/lib;; *) SVMLLP="$PLATFORMLIBDIR:/lib:/usr$PLATFORMLIBDIR:/usr/lib" esac -LD_LIBRARY_PATH="$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}" exec $GDB "$BIN/squeak" "$@"
See comments for other file...