Pass arguments through cleanly rather than performing extra escaping. b=307185 Patch from Tuukka Tolvanen <tuukka.tolvanen@gmail.com>. r=bsmedberg sr=bryner

This commit is contained in:
dbaron%dbaron.org 2005-09-20 21:11:37 +00:00
Родитель e9956e0a63
Коммит ab1d4c6073
7 изменённых файлов: 48 добавлений и 127 удалений

Просмотреть файл

@ -36,7 +36,7 @@
#
# ***** END LICENSE BLOCK *****
## $Id: mozilla.in,v 1.12 2005-04-04 19:08:49 bsmedberg%covad.net Exp $
## $Id: mozilla.in,v 1.13 2005-09-20 21:11:34 dbaron%dbaron.org Exp $
##
## Usage:
##
@ -137,7 +137,6 @@ if [ $found = 0 ]; then
fi
script_args=""
moreargs=""
debugging=0
MOZILLA_BIN="${progbase}-bin"
@ -145,7 +144,8 @@ if [ "$OSTYPE" = "beos" ]; then
mimeset -F "$MOZILLA_BIN"
fi
while [ $# -gt 0 ]
pass_arg_count=0
while [ $# -gt $pass_arg_count ]
do
case "$1" in
-p | --pure | -pure)
@ -162,14 +162,16 @@ do
shift 2
;;
*)
moreargs="$moreargs \"$1\""
shift 1
# Move the unrecognized argument to the end of the list.
arg="$1"
shift
set -- "$@" "$arg"
pass_arg_count=`expr $pass_arg_count + 1`
;;
esac
done
export MRE_HOME
eval "set -- $moreargs"
## Start addon scripts
moz_pis_startstop_scripts "start"

Просмотреть файл

@ -36,7 +36,7 @@
#
# ***** END LICENSE BLOCK *****
## $Id: mozilla.in,v 1.7 2005-02-02 15:10:47 gerv%gerv.net Exp $
## $Id: mozilla.in,v 1.8 2005-09-20 21:11:35 dbaron%dbaron.org Exp $
##
## Usage:
##
@ -136,7 +136,6 @@ if [ $found = 0 ]; then
fi
script_args=""
moreargs=""
debugging=0
MOZILLA_BIN="${progbase}-bin"
@ -222,7 +221,8 @@ fi
# Default action - no running instance or _USE_EXIST (${_USE_EXIST}) ! -eq 1
########################################################################### Main
while [ $# -gt 0 ]
pass_arg_count=0
while [ $# -gt $pass_arg_count ]
do
case "$1" in
-p | --pure | -pure)
@ -239,14 +239,16 @@ do
shift 2
;;
*)
moreargs="$moreargs \"$1\""
shift 1
# Move the unrecognized argument to the end of the list.
arg="$1"
shift
set -- "$@" "$arg"
pass_arg_count=`expr $pass_arg_count + 1`
;;
esac
done
export MRE_HOME
eval "set -- $moreargs"
## Start addon scripts
moz_pis_startstop_scripts "start"

Просмотреть файл

@ -36,7 +36,7 @@
#
# ***** END LICENSE BLOCK *****
## $Id: mozilla.in,v 1.2 2004-04-25 15:36:32 gerv%gerv.net Exp $
## $Id: mozilla.in,v 1.3 2005-09-20 21:11:35 dbaron%dbaron.org Exp $
##
## Usage:
##
@ -100,7 +100,6 @@ else
fi
script_args=""
moreargs=""
debugging=0
MOZILLA_BIN="mozilla-bin"
@ -108,7 +107,8 @@ if [ "$OSTYPE" = "beos" ]; then
mimeset -F $MOZILLA_BIN
fi
while [ $# -gt 0 ]
pass_arg_count=0
while [ $# -gt $pass_arg_count ]
do
case "$1" in
-p | -pure)
@ -125,14 +125,16 @@ do
shift 2
;;
*)
moreargs="$moreargs \"$1\""
shift 1
# Move the unrecognized argument to the end of the list.
arg="$1"
shift
set -- "$@" "$arg"
pass_arg_count=`expr $pass_arg_count + 1`
;;
esac
done
export MRE_HOME
eval "set -- $moreargs"
if [ $debugging = 1 ]
then
echo $dist_bin/run-mozilla.sh $script_args $dist_bin/$MOZILLA_BIN "$@"

Просмотреть файл

@ -36,7 +36,7 @@
#
# ***** END LICENSE BLOCK *****
## $Id: mozilla.in,v 1.5 2005-04-04 19:08:49 bsmedberg%covad.net Exp $
## $Id: mozilla.in,v 1.6 2005-09-20 21:11:35 dbaron%dbaron.org Exp $
##
## Usage:
##
@ -136,7 +136,6 @@ if [ $found = 0 ]; then
fi
script_args=""
moreargs=""
debugging=0
MOZILLA_BIN="${progbase}-bin"
@ -144,7 +143,8 @@ if [ "$OSTYPE" = "beos" ]; then
mimeset -F "$MOZILLA_BIN"
fi
while [ $# -gt 0 ]
pass_arg_count=0
while [ $# -gt $pass_arg_count ]
do
case "$1" in
-p | --pure | -pure)
@ -161,14 +161,16 @@ do
shift 2
;;
*)
moreargs="$moreargs \"$1\""
shift 1
# Move the unrecognized argument to the end of the list.
arg="$1"
shift
set -- "$@" "$arg"
pass_arg_count=`expr $pass_arg_count + 1`
;;
esac
done
export MRE_HOME
eval "set -- $moreargs"
## Start addon scripts
moz_pis_startstop_scripts "start"

Просмотреть файл

@ -1,91 +0,0 @@
#!/bin/sh
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
##
## Usage:
##
## $ mozilla-viewer.sh [viewer args]
##
## This script is meant to run the gecko viewer from either
## mozilla/webshell/tests/viewer or mozilla/dist/bin.
##
## The script will setup all the environment voodoo needed to make
## the viewer work.
##
dist_bin=`dirname $0`
script_args=""
moreargs=""
MOZILLA_BIN="viewer"
pass_all_args=0
while [ $# -gt 0 ]
do
if [ $pass_all_args -ne 0 ]
then
moreargs="$moreargs \"$1\""
shift
else
case $1 in
-h | --help)
script_args="$script_args -h"
shift
;;
-g | --debug)
script_args="$script_args -g"
shift
;;
-d | --debugger)
script_args="$script_args -d $2"
shift 2
;;
--)
shift
pass_all_args=1
;;
*)
moreargs="$moreargs \"$1\""
shift 1
;;
esac
fi
done
eval "set -- $moreargs"
echo $dist_bin/run-mozilla.sh $script_args $dist_bin/$MOZILLA_BIN "$@"
$dist_bin/run-mozilla.sh $script_args $dist_bin/$MOZILLA_BIN "$@"

Просмотреть файл

@ -36,7 +36,7 @@
#
# ***** END LICENSE BLOCK *****
## $Id: mozilla.in,v 1.8 2005-03-29 22:02:22 kairo%kairo.at Exp $
## $Id: mozilla.in,v 1.9 2005-09-20 21:11:35 dbaron%dbaron.org Exp $
##
## Usage:
##
@ -140,7 +140,6 @@ else
fi
script_args=""
moreargs=""
debugging=0
MOZILLA_BIN="%MOZILLA-BIN%"
@ -148,7 +147,8 @@ if [ "$OSTYPE" = "beos" ]; then
mimeset -F $MOZILLA_BIN
fi
while [ $# -gt 0 ]
pass_arg_count=0
while [ $# -gt $pass_arg_count ]
do
case "$1" in
-p | -pure)
@ -165,14 +165,16 @@ do
shift 2
;;
*)
moreargs="$moreargs \"$1\""
shift 1
# Move the unrecognized argument to the end of the list.
arg="$1"
shift
set -- "$@" "$arg"
pass_arg_count=`expr $pass_arg_count + 1`
;;
esac
done
export MRE_HOME
eval "set -- $moreargs"
## Start addon scripts
moz_pis_startstop_scripts "start"

Просмотреть файл

@ -36,7 +36,7 @@
#
# ***** END LICENSE BLOCK *****
## $Id: mozilla.in,v 1.2 2004-12-01 22:27:02 gerv%gerv.net Exp $
## $Id: mozilla.in,v 1.3 2005-09-20 21:11:37 dbaron%dbaron.org Exp $
##
## Usage:
##
@ -137,7 +137,6 @@ if [ $found = 0 ]; then
fi
script_args=""
moreargs=""
debugging=0
MOZILLA_BIN="${progbase}-bin"
MOZ_CLIENT_PROGRAM="$dist_bin/mozilla-xremote-client"
@ -243,7 +242,8 @@ fi
# Default action - no running instance or _USE_EXIST (${_USE_EXIST}) ! -eq 1
########################################################################### Main
while [ $# -gt 0 ]
pass_arg_count=0
while [ $# -gt $pass_arg_count ]
do
case "$1" in
-p | --pure | -pure)
@ -260,14 +260,16 @@ do
shift 2
;;
*)
moreargs="$moreargs \"$1\""
shift 1
# Move the unrecognized argument to the end of the list.
arg="$1"
shift
set -- "$@" "$arg"
pass_arg_count=`expr $pass_arg_count + 1`
;;
esac
done
export MRE_HOME
eval "set -- $moreargs"
## Start addon scripts
moz_pis_startstop_scripts "start"