%endif
Summary: Google Chrome
Name: google-chrome%{?gcsuffix}
-Version: 70.0.3538.67
+Version: 71.0.3578.98
Release: 1
License: Multiple, see http://chrome.google.com/
Group: Applications/Networking
Source0: http://dl.google.com/linux/chrome/rpm/stable/x86_64/google-chrome-%{state}-%{version}-%{release}.x86_64.rpm
-# NoSource0-md5: 08255d912e6fb3261ba345143c7b8422
+# NoSource0-md5: 90f4c696357da96926c8724365bdce0d
NoSource: 0
Source1: google-chrome.sh
Source2: find-lang.sh
set -e
-echo -n "Fetching latest version... "
-t=$(mktemp)
-
-# poldek is buggy, see https://bugs.launchpad.net/poldek/+bug/1026762
-#poldek -q --st=metadata --source "$sourceurl/" --update
-#poldek -q --skip-installed --st=metadata --source "$sourceurl/" --cmd "ls google-chrome-$branch" > $t
-
-repodata=primary-$branch-$(date +%Y%m%d).xml
-[ "$cache" = "yes" ] || rm -f "$repodata"
-test -e $repodata || {
- wget $sourceurl/repodata/primary.xml.gz -O $repodata.gz
- gzip -dc $repodata.gz > $repodata || test -s $repodata
-}
-perl -ne 'm{<name>google-'$product-$branch'</name>} and m{<version epoch="0" ver="([\d.]+)" rel="(\d+)"/>} and print "$1 $2"' > $t < $repodata
+fetch_version() {
+ echo -n "Fetching latest version... "
+ t=$(mktemp)
+
+ # poldek is buggy, see https://bugs.launchpad.net/poldek/+bug/1026762
+ #poldek -q --st=metadata --source "$sourceurl/" --update
+ #poldek -q --skip-installed --st=metadata --source "$sourceurl/" --cmd "ls google-chrome-$branch" > $t
-set -- $(sed -re "s,^.+-([^-]+)-([^-]+).$arch$,\1 \2," $t)
+ repodata=primary-$branch-$(date +%Y%m%d).xml
+ [ "$cache" = "yes" ] || rm -f "$repodata"
+ test -e $repodata || {
+ wget $sourceurl/repodata/primary.xml.gz -O $repodata.gz
+ gzip -dc $repodata.gz > $repodata || test -s $repodata
+ }
+ perl -ne 'm{<name>google-'$product-$branch'</name>} and m{<version epoch="0" ver="([\d.]+)" rel="(\d+)"/>} and print "$1 $2"' > $t < $repodata
-ver=$1
-rel=$2
+ set -- $(sed -re "s,^.+-([^-]+)-([^-]+).$arch$,\1 \2," $t)
+
+ ver=$1
+ rel=$2
+}
+
+if [ -n "$2" ]; then
+ ver=$2
+ rel=1
+else
+ fetch_version
+fi
if [ -z "$ver" -o -z "$rel" ]; then
die "Error: xml file is missing data for ${branch} type"