MozillaFirefox/mozilla.sh.in
author Stefan Br?ns <stefan.bruens@rwth-aachen.de>
Sun, 01 Oct 2017 23:16:23 +0200
branchfirefox56
changeset 997 ca8a6ac7fbf6
parent 992 b2ba34e0dc10
child 1119 4c5d44d40a03
permissions -rw-r--r--
- Correct plugin directory for aarch64 (boo#1061207). The wrapper script was not detecting aarch64 as a 64 bit architecture, thus used /usr/lib/browser-plugins/.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     1
#!/bin/sh
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     2
#
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     3
# ***** BEGIN LICENSE BLOCK *****
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     4
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     5
#
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     6
# The contents of this file are subject to the Mozilla Public License Version
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     7
# 1.1 (the "License"); you may not use this file except in compliance with
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     8
# the License. You may obtain a copy of the License at
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     9
# http://www.mozilla.org/MPL/
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    10
#
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    11
# Software distributed under the License is distributed on an "AS IS" basis,
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    12
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    13
# for the specific language governing rights and limitations under the
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    14
# License.
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    15
#
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    16
# The Original Code is mozilla.org Code.
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    17
#
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    18
# The Initial Developer of the Original Code is
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    19
# Netscape Communications Corporation.
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    20
# Portions created by the Initial Developer are Copyright (C) 1998
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    21
# the Initial Developer. All Rights Reserved.
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    22
#
212
f25759227036 put some more logic into MOZ_APP_LAUNCHER setting
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 5
diff changeset
    23
# Contributor(s):
5
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    24
#    Wolfgang Rosenauer <wolfgang.rosenauer@suse.de>
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    25
#                       <wr@rosenauer.org>
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    26
#
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    27
# Alternatively, the contents of this file may be used under the terms of
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    28
# either the GNU General Public License Version 2 or later (the "GPL"), or
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    29
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    30
# in which case the provisions of the GPL or the LGPL are applicable instead
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    31
# of those above. If you wish to allow use of your version of this file only
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    32
# under the terms of either the GPL or the LGPL, and not to allow others to
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    33
# use your version of this file under the terms of the MPL, indicate your
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    34
# decision by deleting the provisions above and replace them with the notice
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    35
# and other provisions required by the GPL or the LGPL. If you do not delete
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    36
# the provisions above, a recipient may use your version of this file under
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    37
# the terms of any one of the MPL, the GPL or the LGPL.
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    38
#
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    39
# ***** END LICENSE BLOCK *****
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    40
212
f25759227036 put some more logic into MOZ_APP_LAUNCHER setting
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 5
diff changeset
    41
##
5
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    42
## Usage:
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    43
##
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    44
## $ mozilla [args]
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    45
##
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    46
## This script is meant to run a mozilla program from the mozilla
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    47
## rpm installation.
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    48
##
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    49
## The script will setup all the environment voodoo needed to make
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    50
## mozilla work.
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    51
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    52
cmdname=`basename $0`
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    53
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    54
##
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    55
## Variables
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    56
##
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    57
MOZ_DIST_BIN="%PREFIX"
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    58
MOZ_DIST_LIB="%PROGDIR"
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    59
MOZ_APPNAME="%APPNAME"
502
ba1be580e369 start firefox (not firefox-bin) anymore as it's the same binary anyway
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 465
diff changeset
    60
MOZ_PROGRAM="$MOZ_DIST_LIB/$MOZ_APPNAME"
5
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    61
212
f25759227036 put some more logic into MOZ_APP_LAUNCHER setting
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 5
diff changeset
    62
MOZ_APP_LAUNCHER="$MOZ_DIST_LIB/$MOZ_APPNAME.sh"
f25759227036 put some more logic into MOZ_APP_LAUNCHER setting
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 5
diff changeset
    63
if [ "$0" = "$MOZ_APP_LAUNCHER" ]; then
f25759227036 put some more logic into MOZ_APP_LAUNCHER setting
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 5
diff changeset
    64
  [ -h "/usr/bin/$MOZ_APPNAME" ] && \
f25759227036 put some more logic into MOZ_APP_LAUNCHER setting
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 5
diff changeset
    65
   _link=$(readlink -f "/usr/bin/$MOZ_APPNAME")
f25759227036 put some more logic into MOZ_APP_LAUNCHER setting
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 5
diff changeset
    66
  if [ "$_link" = "$MOZ_APP_LAUNCHER" ]; then
f25759227036 put some more logic into MOZ_APP_LAUNCHER setting
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 5
diff changeset
    67
    export MOZ_APP_LAUNCHER="/usr/bin/$MOZ_APPNAME"
f25759227036 put some more logic into MOZ_APP_LAUNCHER setting
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 5
diff changeset
    68
  fi
f25759227036 put some more logic into MOZ_APP_LAUNCHER setting
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 5
diff changeset
    69
else
f25759227036 put some more logic into MOZ_APP_LAUNCHER setting
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 5
diff changeset
    70
  export MOZ_APP_LAUNCHER="/usr/bin/$MOZ_APPNAME"
f25759227036 put some more logic into MOZ_APP_LAUNCHER setting
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 5
diff changeset
    71
fi
5
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    72
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    73
mozilla_lib=`file $MOZ_PROGRAM`
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    74
LIB=lib
997
ca8a6ac7fbf6 - Correct plugin directory for aarch64 (boo#1061207). The wrapper
Stefan Br?ns <stefan.bruens@rwth-aachen.de>
parents: 992
diff changeset
    75
echo $mozilla_lib | grep -q -E 'ELF.64-bit.*(x86-64|S/390|PowerPC|ARM aarch64)' && LIB=lib64
5
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    76
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    77
BROWSER_PLUGIN_DIR=/usr/$LIB/browser-plugins
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    78
if [ ! -d $BROWSER_PLUGIN_DIR ]; then
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    79
  BROWSER_PLUGIN_DIR=/opt/netscape/plugins
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    80
fi
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    81
264
73231d44ef1f fix startscript for non standalone glue
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 212
diff changeset
    82
MOZILLA_FIVE_HOME="$MOZ_DIST_LIB"
73231d44ef1f fix startscript for non standalone glue
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 212
diff changeset
    83
export MOZILLA_FIVE_HOME
73231d44ef1f fix startscript for non standalone glue
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 212
diff changeset
    84
LD_LIBRARY_PATH=$MOZ_DIST_LIB${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
73231d44ef1f fix startscript for non standalone glue
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 212
diff changeset
    85
export LD_LIBRARY_PATH
73231d44ef1f fix startscript for non standalone glue
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 212
diff changeset
    86
5
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    87
# needed for SUN Java under Xorg >= 7.2
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    88
export LIBXCB_ALLOW_SLOPPY_LOCK=1
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    89
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    90
##
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    91
if [ -z "$MOZ_PLUGIN_PATH" ]; then
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    92
  export MOZ_PLUGIN_PATH=$BROWSER_PLUGIN_DIR
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    93
else
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    94
  # make sure that BROWSER_PLUGIN_DIR is in MOZ_PLUGIN_PATH
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    95
  echo "$MOZ_PLUGIN_PATH" | grep "$BROWSER_PLUGIN_DIR" 2>&1 >/dev/null
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    96
  _retval=$?
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    97
  if [ ${_retval} -ne 0 ]; then
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    98
    export MOZ_PLUGIN_PATH=$MOZ_PLUGIN_PATH:$BROWSER_PLUGIN_DIR
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    99
  fi
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   100
fi
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   101
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   102
# disable Gnome crash dialog (doesn't make sense anyway)
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   103
export GNOME_DISABLE_CRASH_DIALOG=1
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   104
956
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 820
diff changeset
   105
# enable xinput2 (boo#1032003)
992
b2ba34e0dc10 Firefox 55.0.3 and some other fixes
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 956
diff changeset
   106
# breaks too many things right now (boo#1053959)
b2ba34e0dc10 Firefox 55.0.3 and some other fixes
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 956
diff changeset
   107
#export MOZ_USE_XINPUT2=1
956
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 820
diff changeset
   108
5
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   109
moz_debug=0
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   110
script_args=""
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   111
pass_arg_count=0
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   112
while [ $# -gt $pass_arg_count ]
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   113
do
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   114
  case "$1" in
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   115
    -d | --debugger)
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   116
      moz_debugger=$2;
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   117
      if [ "${moz_debugger}" != "" ]; then
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   118
        shift 2
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   119
        moz_debug=1
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   120
      else
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   121
        echo "-d requires an argument"
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   122
        exit 1
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   123
      fi
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   124
      ;;
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   125
    *)
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   126
      # Move the unrecognized argument to the end of the list.
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   127
      arg="$1"
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   128
      shift
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   129
      set -- "$@" "$arg"
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   130
      pass_arg_count=`expr $pass_arg_count + 1`
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   131
      ;;
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   132
  esac
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   133
done
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   134
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   135
if [ $moz_debug -eq 1 ]; then
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   136
  tmpfile=`mktemp /tmp/mozargs.XXXXXX` || { echo "Cannot create temporary file" >&2; exit 1; }
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   137
  trap " [ -f \"$tmpfile\" ] && /bin/rm -f -- \"$tmpfile\"" 0 1 2 3 13 15
820
419e95018725 fix bashism in mozilla.sh script
Led <ledest@gmail.com>
parents: 502
diff changeset
   138
  echo "set args ${1+"$@"}" > $tmpfile
419e95018725 fix bashism in mozilla.sh script
Led <ledest@gmail.com>
parents: 502
diff changeset
   139
  echo "run" >> $tmpfile
5
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   140
  echo "$moz_debugger $MOZ_PROGRAM -x $tmpfile"
465
c49024069c9d do not spawn a new shell but use exec (bnc#766006)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 392
diff changeset
   141
  exec $moz_debugger "$MOZ_PROGRAM" -x $tmpfile
5
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   142
else
465
c49024069c9d do not spawn a new shell but use exec (bnc#766006)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 392
diff changeset
   143
  exec $MOZ_PROGRAM "$@"
5
17b1dd932700 Add MozillaFirefox package
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   144
fi