File chrome-wrapper of Package chromium-ffmpeg-extra
35
1
#!/bin/bash
2
#
3
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
4
# Use of this source code is governed by a BSD-style license that can be
5
# found in the LICENSE file.
6
7
# Let the wrapped binary know that it has been run through the wrapper.
8
export CHROME_WRAPPER="`readlink -f "$0"`"
9
10
HERE="`dirname "$CHROME_WRAPPER"`"
11
12
# Always use our versions of ffmpeg libs.
13
# This also makes RPMs find the compatibly-named library symlinks.
14
export LD_LIBRARY_PATH="$HERE${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
15
16
export CHROME_VERSION_EXTRA="stable"
17
18
# We don't want bug-buddy intercepting our crashes. http://crbug.com/24120
19
export GNOME_DISABLE_CRASH_DIALOG=SET_BY_GOOGLE_CHROME
20
21
# Allow root usage
22
no_sandbox=
23
if [ "`id -u`" == "0" ]; then
24
no_sandbox=--no-sandbox
25
fi
26
27
# Sanitize std{in,out,err} because they'll be shared with untrusted child
28
# processes (http://crbug.com/376567).
29
exec < /dev/null
30
exec > >(exec cat)
31
exec 2> >(exec cat >&2)
32
33
# Note: exec -a below is a bashism.
34
exec -a "$0" "$HERE/chrome" $no_sandbox "$@"
35