-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We can get away with a simple download script.
- Loading branch information
1 parent
a4ec769
commit fa5e355
Showing
4 changed files
with
27 additions
and
19 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/sh | ||
set -ex | ||
|
||
# autogen_get_geoip is copied from MK v0.10.0. It downloads the | ||
# maxmind DB databases from MaxMind's site. | ||
autogen_get_geoip() { | ||
echo "* Fetching geoip databases" | ||
base=https://geolite.maxmind.com/download/geoip/database | ||
if [ ! -f "country.mmdb" ]; then | ||
curl -fsSLO $base/GeoLite2-Country.tar.gz | ||
tar -xf GeoLite2-Country.tar.gz | ||
mv GeoLite2-Country_20??????/GeoLite2-Country.mmdb country.mmdb | ||
rm -rf GeoLite2-Country_20?????? | ||
fi | ||
if [ ! -f "asn.mmdb" ]; then | ||
curl -fsSLO $base/GeoLite2-ASN.tar.gz | ||
tar -xf GeoLite2-ASN.tar.gz | ||
mv GeoLite2-ASN_20??????/GeoLite2-ASN.mmdb asn.mmdb | ||
rm -rf GeoLite2-ASN_20?????? | ||
fi | ||
} | ||
|
||
version=`date +%Y%m%d` | ||
autogen_get_geoip | ||
curl -fsSLo ca-bundle.pem https://curl.haxx.se/ca/cacert.pem | ||
tar -cvzf "generic-assets-${version}.tar.gz" \ | ||
"README.md" "asn.mmdb" "ca-bundle.pem" "country.mmdb" |
Submodule Modules
deleted from
38755d