3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/physics/lhapdf/maintainer.sh

12 lines
362 B
Bash
Raw Normal View History

2016-06-11 22:12:00 +01:00
#!/bin/bash
set -e
BASE_URL="https://lhapdf.hepforge.org/downloads?f=pdfsets/6.2/"
2016-06-11 22:12:00 +01:00
for pdf_set in `curl $BASE_URL 2>/dev/null | gsed -e "s/.*<a href=\"[^\"]*\/\([^\"/]*.tar.gz\)\".*/\1/;tx;d;:x" | gsed -e "s/%2B/+/g" | sort -u`; do
2016-06-11 22:12:00 +01:00
echo -n " \"${pdf_set%.tar.gz}\" = \""
nix-prefetch-url "${BASE_URL}${pdf_set}" 2>/dev/null | tr -d '\n'
echo "\";"
done