nixpkgs/pkgs/development/libraries/physics/lhapdf/maintainer.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
403 B
Bash
Raw Normal View History

2016-06-11 21:12:00 +00:00
#!/bin/bash
2021-03-15 14:47:23 +00:00
set -xe
2016-06-11 21:12:00 +00:00
2021-03-15 14:47:23 +00:00
: ${SED:="$(nix-build '<nixpkgs>' -A gnused --no-out-link)/bin/sed"}
2016-06-11 21:12:00 +00:00
2022-04-23 00:54:19 +00:00
BASE_URL="https://lhapdfsets.web.cern.ch/current/"
2021-03-15 14:47:23 +00:00
2022-04-23 00:54:19 +00:00
for pdf_set in `curl -L $BASE_URL 2>/dev/null | "$SED" -n -e 's/.*<a href=".*\/\([^"/]*\.tar\.gz\)".*/\1/p' | sort -u`; do
echo -n " \"${pdf_set%.tar.gz}\" = \""
nix-prefetch-url "${BASE_URL}${pdf_set}" 2>/dev/null | tr -d '\n'
echo "\";"
2016-06-11 21:12:00 +00:00
done