X-Git-Url: http://git.pld-linux.org/?p=packages%2Fchromium-browser.git;a=blobdiff_plain;f=chromium-browser.sh;h=8aa1e380ea2393642ee035ffd55a741b5350af0e;hp=00047febf503599f586e02cf31ab0e0473af3605;hb=HEAD;hpb=f0506bfdbda2929142aed3380b07a44ef11c8324 diff --git a/chromium-browser.sh b/chromium-browser.sh old mode 100644 new mode 100755 index 00047fe..8aa1e38 --- a/chromium-browser.sh +++ b/chromium-browser.sh @@ -1,15 +1,39 @@ #!/bin/sh +APPNAME=chromium-browser +LIBDIR=@libdir@ +GDB=/usr/bin/gdb -# Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. +# Allow the user to override command-line flags, http://bugs.gentoo.org/357629 +# This is based on Debian's chromium-browser package, and is intended +# to be consistent with Debian. +if [ -f /etc/$APPNAME/default ]; then + . /etc/$APPNAME/default +fi + +die() { + echo >&2 "$*" + exit 1 +} + +usage() { + cat < $tmpfile + echo "# Env:" + echo "# LD_LIBRARY_PATH=$LD_LIBRARY_PATH" + echo "# PATH=$PATH" + echo "# GTK_PATH=$GTK_PATH" + echo "# CHROMIUM_USER_FLAGS=$CHROMIUM_USER_FLAGS" + echo "# CHROMIUM_FLAGS=$CHROMIUM_FLAGS" + echo "$GDB $LIBDIR/$APPNAME -x $tmpfile" + $GDB "$LIBDIR/$APPNAME" -x $tmpfile + rc=$? + if [ $want_temp_profile -eq 1 ]; then + rm -rf $TEMP_PROFILE + fi + exit $rc +else + if [ $want_temp_profile -eq 0 ]; then + exec $LIBDIR/$APPNAME $CHROMIUM_FLAGS "$@" + else + # we can't exec here as we need to clean-up the temporary profile + $LIBDIR/$APPNAME $CHROMIUM_FLAGS "$@" + rm -rf $TEMP_PROFILE + fi +fi