[packages/chromium-browser] setup distro variant in CHROME_VERSION_EXTRA

glen glen at pld-linux.org
Sun Feb 10 00:19:45 CET 2013


commit 07e314b1d3fb576fd779b229af953dbcdfefd08b
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sun Feb 10 01:19:40 2013 +0200

    setup distro variant in CHROME_VERSION_EXTRA

 chromium-browser.sh | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/chromium-browser.sh b/chromium-browser.sh
index a6b5d5d..e05708d 100755
--- a/chromium-browser.sh
+++ b/chromium-browser.sh
@@ -26,8 +26,16 @@ if [ -z "$m" ]; then
 	EOF
 fi
 
+# lsb_release is slow so try to source the static file /etc/lsb-release
+# instead, and fallback to lsb_release if we didn't get the information we need
+if [ -e /etc/lsb-release ] ; then
+	. /etc/lsb-release
+fi
+DIST=${DISTRIB_ID:-$(lsb_release -si)}
+RELEASE=${DISTRIB_CODENAME:-$(lsb_release -sc)}
+
 # Set CHROME_VERSION_EXTRA visible in the About dialog and in about:version
-export CHROME_VERSION_EXTRA="PLD Linux"
+export CHROME_VERSION_EXTRA="$DIST Linux $RELEASE"
 
 # Let the wrapped binary know that it has been run through the wrapper
 export CHROME_WRAPPER="$(readlink -f "$0")"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/chromium-browser.git/commitdiff/07e314b1d3fb576fd779b229af953dbcdfefd08b



More information about the pld-cvs-commit mailing list