Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Hutchinson <mhutchinson@novell.com>2009-03-13 03:42:37 +0300
committerMichael Hutchinson <mhutchinson@novell.com>2009-03-13 03:42:37 +0300
commit4b3a0507a9f0065544d5aeac3c08ba79d376e085 (patch)
tree549a3fde8b2880a1efd7b24176237e61142792fb /main/mdtool.in
parent77634c26304b3b5f2dc39356257779527716ead2 (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/mdtool.in')
-rw-r--r--main/mdtool.in24
1 files changed, 12 insertions, 12 deletions
diff --git a/main/mdtool.in b/main/mdtool.in
index 65c05a2426..9ca3b19ff1 100644
--- a/main/mdtool.in
+++ b/main/mdtool.in
@@ -1,24 +1,26 @@
#!/bin/bash
#this script should be in $PREFIX/bin
-PREFIX="${0%%/mdtool}/.."
+PREFIX="${0%%/bin/mdtool}"
+MONO_EXEC="exec -a mdtool mono"
+EXE_PATH="$PREFIX/lib/monodevelop/bin/mdrun.exe"
MD_FORCE_DEBUG=yes
-for arg in $*; do
+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-debug)
@@ -26,21 +28,19 @@ case x$arg in
shift
;;
*)
- ARGS="$ARGS $arg"
+ ARGS+=("$arg")
shift
;;
esac
done
if [ -z MD_FORCE_DEBUG ]; then
- MONO_OPTIONS="$MONO_OPTIONS --debug"
+ MONO_OPTIONS+=("--debug")
fi
-if [ -n "$MONO_OPTIONS" ]; then
- echo "** Running with Mono options: $MONO_OPTIONS **"
+if [ -n "${MONO_OPTIONS[0]}" ]; then
+ echo "** Running with Mono options: ${MONO_OPTIONS[@]} **"
fi
-exec_args="-a mdtool mono $MONO_OPTIONS $PREFIX/lib/monodevelop/bin/mdrun.exe $ARGS"
-
-exec $exec_args
+$MONO_EXEC "${MONO_OPTIONS[@]}" "$EXE_PATH" "${ARGS[@]}"