summaryrefslogtreecommitdiffstats
path: root/debian/create-orig.sh
diff options
context:
space:
mode:
Diffstat (limited to 'debian/create-orig.sh')
-rwxr-xr-xdebian/create-orig.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/debian/create-orig.sh b/debian/create-orig.sh
new file mode 100755
index 0000000..1dca095
--- /dev/null
+++ b/debian/create-orig.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+OLDDIR=$(pwd)
+TMPDIR=$(mktemp -d)
+DATE=$(date +'%Y%m%d')
+
+cd ${TMPDIR}
+
+wget https://mailfud.org/geoip-legacy/GeoIP.dat.gz
+wget https://mailfud.org/geoip-legacy/GeoIPv6.dat.gz
+gunzip GeoIP.dat.gz GeoIPv6.dat.gz
+
+mkdir ${TMPDIR}/geoip-database-${DATE}
+
+mv GeoIP.dat GeoIPv6.dat ${TMPDIR}/geoip-database-${DATE}/
+
+tar -cJf geoip-database_${DATE}.orig.tar.xz geoip-database-${DATE}
+mv geoip-database_${DATE}.orig.tar.xz ${OLDDIR}/../geoip-database_${DATE}.orig.tar.xz
+
+cd ${OLDDIR}
+rm -rf ${TMPDIR}
+
+echo "Saved tarball: ${OLDDIR}/../geoip-database_${DATE}.orig.tar.xz"
+
+exit 0