2015-03-31 14:54:06 +01:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
|
|
|
source "$stdenv/setup"
|
|
|
|
|
|
|
|
mkdir -p $out/share/GeoIP
|
|
|
|
cd $out/share/GeoIP
|
|
|
|
|
|
|
|
# Iterate over all environment variable names beginning with "src":
|
|
|
|
for var in "${!src@}"; do
|
|
|
|
# Store the value of the variable with name $var in $src:
|
|
|
|
eval src="\$$var"
|
|
|
|
|
|
|
|
# Copy $src to current directory, removing Nix hash from the filename:
|
|
|
|
dest="${src##*/}"
|
|
|
|
dest="${dest#*-}"
|
|
|
|
cp "$src" "$dest"
|
|
|
|
done
|
|
|
|
|
2015-04-28 21:00:56 +01:00
|
|
|
gzip -dv *.gz
|
2017-09-18 20:54:00 +01:00
|
|
|
|
|
|
|
ln -s GeoLiteCity.dat GeoIPCity.dat
|
|
|
|
ln -s GeoLiteCityv6.dat GeoIPCityv6.dat
|