Remove automatic GeoIP download from the build scripts.

The database file is now locked behind an account login.

https://blog.maxmind.com/2019/12/18/significant-changes-to-accessing-and-using-geolite2-databases/
This commit is contained in:
Paul Chote
2019-12-31 12:37:09 +00:00
committed by abcdefg30
parent 9d7ecdbc2c
commit e063e13ff4
4 changed files with 5 additions and 39 deletions

View File

@@ -1,22 +0,0 @@
#!/bin/sh
# Die on any error for Travis CI to automatically retry:
set -e
download_dir="${0%/*}/download"
mkdir -p "${download_dir}"
cd "${download_dir}" || exit 1
filename="GeoLite2-Country.mmdb.gz"
# Database does not exist or is older than 30 days.
if [ ! -e $filename ] || [ -n "$(find . -name $filename -mtime +30 -print)" ]; then
rm -f $filename
echo "Updating GeoIP country database from MaxMind."
if command -v curl >/dev/null 2>&1; then
curl -s -L -O http://geolite.maxmind.com/download/geoip/database/$filename
else
wget -cq http://geolite.maxmind.com/download/geoip/database/$filename
fi
fi

View File

@@ -104,13 +104,6 @@ if (!(Test-Path "rix0rrr.BeaconLib.dll"))
rmdir rix0rrr.BeaconLib -Recurse
}
if (!(Test-Path "GeoLite2-Country.mmdb.gz") -Or (((get-date) - (get-item "GeoLite2-Country.mmdb.gz").LastWriteTime) -gt (new-timespan -days 30)))
{
echo "Updating GeoIP country database from MaxMind."
$target = Join-Path $pwd.ToString() "GeoLite2-Country.mmdb.gz"
(New-Object System.Net.WebClient).DownloadFile("http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz", $target)
}
[Net.ServicePointManager]::SecurityProtocol = 'Tls12'
if (!(Test-Path "SDL2-CS.dll"))