mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-16 06:47:09 +03:00
21 lines
419 B
Bash
21 lines
419 B
Bash
#!/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
|
|
|
|
gzip -dv *.gz
|
|
xz -dv *.xz
|