]> git.pld-linux.org Git - packages/GeoIP-db-Country.git/commitdiff
version: use newest datafile (ipv4/ipv6)
authorElan Ruusamäe <glen@delfi.ee>
Mon, 3 Mar 2014 12:00:04 +0000 (14:00 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Mon, 3 Mar 2014 12:00:04 +0000 (14:00 +0200)
GeoIP-db-Country.spec

index 7ceb3b55b6badc9d124eb242979e231ee9bf53ac..be3931fe1daf2125dba51a33f17a55340537cd18 100644 (file)
@@ -36,10 +36,14 @@ przez MaxWind, dostępne z <http://www.maxwind.com/>.
 cp -p %{SOURCE0} .
 cp -p %{SOURCE1} .
 
-gunzip GeoIP-%{version}.dat.gz
-gunzip GeoIPv6-%{version}.dat.gz
-
-ver=$(TZ=GMT stat -c '%y' GeoIP-%{version}.dat | awk '{print $1}' | tr - .)
+gzip -d GeoIP-%{version}.dat.gz GeoIPv6-%{version}.dat.gz
+dt4=$(TZ=GMT stat -c '%y' GeoIP-%{version}.dat | awk '{print $1}' | tr - .)
+dt5=$(TZ=GMT stat -c '%y' GeoIP-%{version}.dat | awk '{print $1}' | tr - .)
+if [ "$(echo $dt4 | tr -d .)" -gt "$(echo $dt6 | tr -d .)" ]; then
+       ver=$dt4
+else
+       ver=$dt6
+fi
 if [ "$ver" != %{version} ]; then
        exit 1
 fi
This page took 0.029892 seconds and 4 git commands to generate.