11 lines
441 B
Bash
11 lines
441 B
Bash
|
#!/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)"
|