diff options
author | Michael Hutchinson <mhutchinson@novell.com> | 2009-03-13 03:42:37 +0300 |
---|---|---|
committer | Michael Hutchinson <mhutchinson@novell.com> | 2009-03-13 03:42:37 +0300 |
commit | 4b3a0507a9f0065544d5aeac3c08ba79d376e085 (patch) | |
tree | 549a3fde8b2880a1efd7b24176237e61142792fb /main/monodevelop.in | |
parent | 77634c26304b3b5f2dc39356257779527716ead2 (diff) |
* mdtool.in:
* monodevelop.in:
* build/MacOSX/mdtool:
* build/MacOSX/monodevelop: Fix escaping and handling of escaped
arguments. Fixes "Bug 484954 - Monodevelop does not start from volumes
with spaces in the name" and "Bug 483260 - mdtool doesn't properly
handle spaces in pathnames.".
svn path=/trunk/monodevelop/; revision=129233
Diffstat (limited to 'main/monodevelop.in')
-rwxr-xr-x | main/monodevelop.in | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/main/monodevelop.in b/main/monodevelop.in index 13bce26637..e7a72bd535 100755 --- a/main/monodevelop.in +++ b/main/monodevelop.in @@ -1,10 +1,12 @@ #!/bin/bash #this script should be in $PREFIX/bin -PREFIX="${0%%/monodevelop}/.." +PREFIX="${0%%/bin/monodevelop}" +MONO_EXEC="exec -a monodevelop mono" +EXE_PATH="$PREFIX/lib/monodevelop/bin/MonoDevelop.exe" MD_FORCE_DEBUG=yes -MD_REDIRECT_LOG="$HOME/.config/MonoDevelop/log" +MD_REDIRECT_LOG="${XDG_CONFIG_HOME:-$HOME/.config}/MonoDevelop/log" ############################# ## BEGIN MOZILLA DETECTION ## @@ -58,22 +60,20 @@ export MOZILLA_FIVE_HOME="$MOZILLA_HOME" ## END MOZILLA DETECTION ## ########################### -ARGS="" - -for arg in $*; do -case x$arg in +for arg in "$@"; do +case "x$arg" in x--profile*) - MONO_OPTIONS="$MONO_OPTIONS $arg" + MONO_OPTIONS+=("$arg") shift ;; x--debug*) export MONODEVELOP_DISPATCH_DEBUG=yes unset MD_FORCE_DEBUG - MONO_OPTIONS="$MONO_OPTIONS $arg" + MONO_OPTIONS+=("$arg") shift ;; x--trace*) - MONO_OPTIONS="$MONO_OPTIONS $arg" + MONO_OPTIONS+=("$arg") shift ;; x--no-log) @@ -85,25 +85,23 @@ case x$arg in shift ;; *) - ARGS="$ARGS $arg" + ARGS+=("$arg") shift ;; esac done -if [ -n "$MONO_OPTIONS" ]; then - echo "** Running with Mono options: $MONO_OPTIONS **" -fi - if [ -z MD_FORCE_DEBUG ]; then - MONO_OPTIONS="$MONO_OPTIONS --debug" + MONO_OPTIONS+=("--debug") fi -exec_args="-a monodevelop mono $MONO_OPTIONS $PREFIX/lib/monodevelop/bin/MonoDevelop.exe $ARGS" +if [ -n "${MONO_OPTIONS[0]}" ]; then + echo "** Running with Mono options: ${MONO_OPTIONS[@]} **" +fi if [ -n "$MD_REDIRECT_LOG" ]; then mkdir -p `dirname "$MD_REDIRECT_LOG"` - exec $exec_args 2>&1 | tee "$MD_REDIRECT_LOG" + $MONO_EXEC "${MONO_OPTIONS[@]}" "$EXE_PATH" "${ARGS[@]}" 2>&1 | tee "$MD_REDIRECT_LOG" else - exec $exec_args + $MONO_EXEC "${MONO_OPTIONS[@]}" "$EXE_PATH" "${ARGS[@]}" fi |