From fdb04e53481a67bdd01b4f038003c699e324a4e1 Mon Sep 17 00:00:00 2001 From: "seawood%netscape.com" Date: Wed, 7 Aug 2002 11:46:15 +0000 Subject: [PATCH] Allow mozilla to handle paths with spaces correctly. (Note: it still doesn't appear to work properly for gdb4. Reportedly works for gdb5 though) Thanks to Andrew Schultz for the patch. Bug #157043 r=cls git-svn-id: svn://10.0.0.236/trunk@126660 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/build/unix/run-mozilla.sh | 14 +++++++------- mozilla/xpfe/bootstrap/mozilla.in | 16 ++++++++-------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/mozilla/build/unix/run-mozilla.sh b/mozilla/build/unix/run-mozilla.sh index c34cae56f25..2de2b8827a8 100755 --- a/mozilla/build/unix/run-mozilla.sh +++ b/mozilla/build/unix/run-mozilla.sh @@ -63,8 +63,8 @@ ## + All the other unices ## # -cmdname=`basename $0` -MOZ_DIST_BIN=`dirname $0` +cmdname=`basename "$0"` +MOZ_DIST_BIN=`dirname "$0"` MOZ_DEFAULT_NAME="./${cmdname}-bin" MOZ_APPRUNNER_NAME="./mozilla-bin" MOZ_VIEWER_NAME="./viewer" @@ -191,7 +191,7 @@ moz_run_program() ## ## Run the program ## - $prog ${1+"$@"} + "$prog" ${1+"$@"} exitcode=$? if [ "$DEBUG_CORE_FILES" ] then @@ -217,7 +217,7 @@ moz_run_program() # For why LD_BIND_NOW is needed LD_BIND_NOW=1; export LD_BIND_NOW - $debugger $prog core + $debugger "$prog" core else echo "Could not find a debugger on your system." fi @@ -254,15 +254,15 @@ moz_debug_program() # over to the prog then add that here- Gagan Saksena 03/15/00 case `basename $debugger` in gdb) echo "$debugger $prog -x /tmp/mozargs$$" - $debugger $prog -x /tmp/mozargs$$ + $debugger "$prog" -x /tmp/mozargs$$ exitcode=$? ;; ddd) echo "$debugger --debugger \"gdb -x /tmp/mozargs$$\" $prog" - $debugger --debugger "gdb -x /tmp/mozargs$$" $prog + $debugger --debugger "gdb -x /tmp/mozargs$$" "$prog" exitcode=$? ;; *) echo "$debugger $prog ${1+"$@"}" - $debugger $prog ${1+"$@"} + $debugger "$prog" ${1+"$@"} exitcode=$? ;; esac diff --git a/mozilla/xpfe/bootstrap/mozilla.in b/mozilla/xpfe/bootstrap/mozilla.in index e7d0f1039ae..5b3035a3d3f 100755 --- a/mozilla/xpfe/bootstrap/mozilla.in +++ b/mozilla/xpfe/bootstrap/mozilla.in @@ -16,7 +16,7 @@ # Reserved. # -## $Id: mozilla.in,v 1.2 2002-06-13 12:16:52 seawood%netscape.com Exp $ +## $Id: mozilla.in,v 1.3 2002-08-07 11:46:15 seawood%netscape.com Exp $ ## ## Usage: ## @@ -43,9 +43,9 @@ else # If not, then start resolving symlinks until we find run-mozilla.sh found=0 progname=$0 - curdir=`dirname $progname` + curdir=`dirname "$progname"` run_moz="$curdir/run-mozilla.sh" - if test -x $run_moz; then + if test -x "$run_moz"; then dist_bin=$curdir found=1 else @@ -57,16 +57,16 @@ else if [ ! -x "$progname" ]; then break fi - curdir=`dirname $progname` + curdir=`dirname "$progname"` run_moz="$curdir/run-mozilla.sh" - if [ -x $run_moz ]; then - cd $curdir + if [ -x "$run_moz" ]; then + cd "$curdir" dist_bin=`pwd` found=1 break fi done - cd $here + cd "$here" fi if [ $found = 0 ]; then # Check default compile-time libdir @@ -117,4 +117,4 @@ if [ $debugging = 1 ] then echo $dist_bin/run-mozilla.sh $script_args $dist_bin/$MOZILLA_BIN "$@" fi -exec $dist_bin/run-mozilla.sh $script_args $dist_bin/$MOZILLA_BIN "$@" +exec "$dist_bin/run-mozilla.sh" $script_args "$dist_bin/$MOZILLA_BIN" "$@"