From: | "PaweA Hajdan (phajdan.jr)" <phajdan.jr@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in www-client/chromium/files: chromium.default chromium-launcher-r2.sh |
Date: | Thu, 26 May 2011 11:09:25 |
Message-Id: | 20110526110913.AA2F120057@flycatcher.gentoo.org |
1 | phajdan.jr 11/05/26 11:09:13 |
2 | |
3 | Added: chromium.default chromium-launcher-r2.sh |
4 | Log: |
5 | Make it easier to override command-line flags, based on Debian's launcher script; bug #357629 by Jonas Bernoulli <jonas@×××××××.li>. |
6 | |
7 | (Portage version: 2.1.9.42/cvs/Linux i686) |
8 | |
9 | Revision Changes Path |
10 | 1.1 www-client/chromium/files/chromium.default |
11 | |
12 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/files/chromium.default?rev=1.1&view=markup |
13 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/files/chromium.default?rev=1.1&content-type=text/plain |
14 | |
15 | Index: chromium.default |
16 | =================================================================== |
17 | # Default settings for chromium. This file is sourced by /bin/bash from |
18 | # the chromium launcher. |
19 | |
20 | # Options to pass to chromium. |
21 | CHROMIUM_FLAGS="" |
22 | |
23 | |
24 | |
25 | 1.1 www-client/chromium/files/chromium-launcher-r2.sh |
26 | |
27 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/files/chromium-launcher-r2.sh?rev=1.1&view=markup |
28 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/files/chromium-launcher-r2.sh?rev=1.1&content-type=text/plain |
29 | |
30 | Index: chromium-launcher-r2.sh |
31 | =================================================================== |
32 | #!/bin/bash |
33 | |
34 | # Allow the user to override command-line flags, bug #357629. |
35 | # This is based on Debian's chromium-browser package, and is intended |
36 | # to be consistent with Debian. |
37 | if [ -f /etc/chromium/default ] ; then |
38 | . /etc/chromium/default |
39 | fi |
40 | |
41 | # Prefer user defined CHROMIUM_USER_FLAGS (from env) over system |
42 | # default CHROMIUM_FLAGS (from /etc/chromium/default). |
43 | CHROMIUM_FLAGS=${CHROMIUM_USER_FLAGS:-"$CHROMIUM_FLAGS"} |
44 | |
45 | # Let the wrapped binary know that it has been run through the wrapper |
46 | export CHROME_WRAPPER="`readlink -f "$0"`" |
47 | |
48 | PROGDIR="`dirname "$CHROME_WRAPPER"`" |
49 | |
50 | case ":$PATH:" in |
51 | *:$PROGDIR:*) |
52 | # $PATH already contains $PROGDIR |
53 | ;; |
54 | *) |
55 | # Append $PROGDIR to $PATH |
56 | export PATH="$PATH:$PROGDIR" |
57 | ;; |
58 | esac |
59 | |
60 | # Set the .desktop file name |
61 | export CHROME_DESKTOP="chromium-browser-chromium.desktop" |
62 | |
63 | exec -a "chromium-browser" "$PROGDIR/chrome" --extra-plugin-dir=/usr/lib/nsbrowser/plugins ${CHROMIUM_FLAGS} "$@" |