Created
November 7, 2014 09:46
-
-
Save rjaeckel/a06986796bea5315d476 to your computer and use it in GitHub Desktop.
Maxmind GeoIP Database download
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
base="http://geolite.maxmind.com/download/geoip/database/" | |
files="GeoLiteCountry/GeoIP GeoIPv6 GeoLiteCity GeoLiteCityv6-beta/GeoLiteCityv6 asnum/GeoIPASNum asnum/GeoIPASNumv6" | |
ext="dat.gz" | |
output="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
#download | |
waitFor="" | |
for file in $files ; do | |
wget -q "$base$file.$ext" & | |
waitFor="$waitFor $!" | |
done | |
wait $waitfor | |
#unpack | |
for d in *.dat.gz; do | |
gzip -df $d & | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment