packages: google-chrome/update-source.sh - use metadata repo to figure vers...

glen glen at pld-linux.org
Fri Apr 8 08:38:41 CEST 2011


Author: glen                         Date: Fri Apr  8 06:38:41 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- use metadata repo to figure versions

---- Files affected:
packages/google-chrome:
   update-source.sh (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: packages/google-chrome/update-source.sh
diff -u packages/google-chrome/update-source.sh:1.2 packages/google-chrome/update-source.sh:1.3
--- packages/google-chrome/update-source.sh:1.2	Thu Oct 14 13:55:13 2010
+++ packages/google-chrome/update-source.sh	Fri Apr  8 08:38:36 2011
@@ -1,12 +1,21 @@
 #!/bin/sh
+arch=x86_64
+sourceurl=http://dl.google.com/linux/chrome/rpm/stable/$arch/
 set -e
 
 echo -n "Fetching latest version... "
 t=$(mktemp)
-curl --silent -o $t https://dl-ssl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
-ver=$(rpm -qp --nodigest --nosignature --qf '%{V}' $t)
-rev=$(rpm -qp --nodigest --nosignature --qf '%{R}' $t)
+
+poldek -q --st=metadata --source "$sourceurl" --update
+poldek -q --skip-installed --st=metadata --source "$sourceurl" --cmd 'ls google-chrome-stable' > $t
+
+set -- $(sed -re "s,^.+-([^-]+)-([^-]+).$arch$,\1 \2," $t)
+
 rm -f $t
+
+ver=$1
+rev=$2
+
 echo "$ver-$rev"
 
 specfile=google-chrome.spec
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/google-chrome/update-source.sh?r1=1.2&r2=1.3&f=u



More information about the pld-cvs-commit mailing list