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
|
2021-11-14 02:54:33 +00:00
|
|
|
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
|