diff options
author | mdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-20 00:49:28 +0000 |
---|---|---|
committer | mdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-20 00:49:28 +0000 |
commit | daea7b0bdd76c8163944c2cd5700cb5c7d0c14de (patch) | |
tree | a85adfb9997427e3eeaa47d53d9c8aa137b6fa65 /chrome/tools | |
parent | 511d63b8fec989b046c1a5f7c5216c3a166fcf74 (diff) | |
download | chromium_src-daea7b0bdd76c8163944c2cd5700cb5c7d0c14de.zip chromium_src-daea7b0bdd76c8163944c2cd5700cb5c7d0c14de.tar.gz chromium_src-daea7b0bdd76c8163944c2cd5700cb5c7d0c14de.tar.bz2 |
Linux: use the system xdg-utils if it looks new enough. This allows us to start
phasing out our copy, and also should fix a default browser bug on Ubuntu 11.04.
BUG=73231
Review URL: http://codereview.chromium.org/6881070
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82203 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/tools')
-rwxr-xr-x | chrome/tools/build/linux/chrome-wrapper | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/chrome/tools/build/linux/chrome-wrapper b/chrome/tools/build/linux/chrome-wrapper index 09f43ac..9bb4016 100755 --- a/chrome/tools/build/linux/chrome-wrapper +++ b/chrome/tools/build/linux/chrome-wrapper @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2010 The Chromium Authors. All rights reserved. +# Copyright (c) 2011 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. @@ -74,19 +74,14 @@ export CHROME_DESKTOP="$DESKTOP.desktop" HERE="`dirname "$CHROME_WRAPPER"`" # We include some xdg utilities next to the binary, and we want to prefer them -# over the system versions because we know they work correctly for us. But if -# our path already exists, we leave it where it is, to allow overriding this. -# (Once distributions have picked up the updated xdg-mime, we can go back to -# appending $HERE rather than prepending.) -case ":$PATH:" in - *:$HERE:*) - # $PATH already contains $HERE, leave it where it is. - ;; - *) - # Prepend $HERE to $PATH. - export PATH="$HERE:$PATH" - ;; -esac +# over the system versions when we know the system versions are very old. We +# detect whether the system xdg utilities are sufficiently new to be likely to +# work for us by looking for xdg-settings. If we find it, we leave $PATH alone, +# so that the system xdg utilities (including any distro patches) will be used. +if ! which xdg-settings &> /dev/null; then + # Old xdg utilities. Prepend $HERE to $PATH to use ours instead. + export PATH="$HERE:$PATH" +fi # Always use our ffmpeg and other shared libs. export LD_LIBRARY_PATH="$HERE:$HERE/lib:$HERE/lib.target${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}" |