2020-04-24 23:36:52 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-03-16 09:55:35 +00:00
|
|
|
set -xe
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-16 09:55:35 +00:00
|
|
|
: ${SED:="$(nix-build '<nixpkgs>' -A gnused --no-out-link)/bin/sed"}
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-16 09:55:35 +00:00
|
|
|
BASE_URL="https://lhapdfsets.web.cern.ch/lhapdfsets/current/"
|
|
|
|
|
|
|
|
for pdf_set in `curl -L $BASE_URL 2>/dev/null | "$SED" -e "s/.*<a href=\"\([^\"/]*.tar.gz\)\".*/\1/;tx;d;:x" | sort -u`; do
|
2021-12-06 16:07:01 +00:00
|
|
|
echo -n " \"${pdf_set%.tar.gz}\" = \""
|
|
|
|
nix-prefetch-url "${BASE_URL}${pdf_set}" 2>/dev/null | tr -d '\n'
|
|
|
|
echo "\";"
|
2020-04-24 23:36:52 +00:00
|
|
|
done
|