1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/libraries/physics/lhapdf/maintainer.sh
2017-07-13 23:38:57 -04:00

12 lines
321 B
Bash
Executable file

#!/bin/bash
set -e
BASE_URL="https://www.hepforge.org/archive/lhapdf/pdfsets/6.2/"
for pdf_set in `curl $BASE_URL 2>/dev/null | gsed -e "s/.*<a href=\"\([^\"]*.tar.gz\)\".*/\1/;tx;d;:x"`; do
echo -n " \"${pdf_set%.tar.gz}\" = \""
nix-prefetch-url "${BASE_URL}${pdf_set}" 2>/dev/null | tr -d '\n'
echo "\";"
done