Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9375)

Unified Diff: chrome_linux/chrome-wrapper

Issue 7192017: Update reference builds to r89207. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/reference_builds/
Patch Set: '' Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome_linux/chrome.pak ('k') | chrome_linux/chrome_sandbox » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_linux/chrome-wrapper
===================================================================
--- chrome_linux/chrome-wrapper (revision 89368)
+++ chrome_linux/chrome-wrapper (working copy)
@@ -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,20 @@
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"
+else
+ # Use system xdg utilities. But first create mimeapps.list if it doesn't
+ # exist; some systems have bugs in xdg-mime that make it fail without it.
+ xdg_app_dir="${XDG_DATA_HOME:-$HOME/.local/share/applications}"
+ mkdir -p "$xdg_app_dir"
+ [ -f "$xdg_app_dir/mimeapps.list" ] || touch "$xdg_app_dir/mimeapps.list"
+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}}"
« no previous file with comments | « chrome_linux/chrome.pak ('k') | chrome_linux/chrome_sandbox » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698