From 67d4a78976097aeb171d26071bad3074cb8e5798 Mon Sep 17 00:00:00 2001 From: Carl George Date: Tue, 13 Aug 2019 14:33:52 -0500 Subject: [PATCH] Add script for checking upstream versions --- update-check.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 update-check.sh diff --git a/update-check.sh b/update-check.sh new file mode 100755 index 0000000..7f26733 --- /dev/null +++ b/update-check.sh @@ -0,0 +1,10 @@ +#!/usr/bin/bash + +function get_date { + curl --silent --head https://geolite.maxmind.com/download/geoip/database/GeoLite2-$1.tar.gz | grep -Po "(?<=GeoLite2-${1}_)\d+(?=\.tar\.gz)" +} + +echo -e "Spec file version: $(rpmspec geolite2.spec --srpm --query --queryformat '%{VERSION}')" +echo -e "City remote version: $(get_date City)" +echo -e "Country remote version: $(get_date Country)" +echo -e "ASN remote version: $(get_date ASN)"