Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 27 additions & 8 deletions src/scripts/build/ext/build_lhapdf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,24 +51,43 @@ cd ${topdir}/download
whichfetchit=`which wget | grep -v "no wget in"`
if [ ! -z "${whichfetchit}" ] ; then
echo use \"wget\" for fetching files
fetchit='wget '
fetchit='wget '
oopt="--output-document"
else
whichfetchit=`which curl | grep -v "no curl in"`
if [ ! -z "${whichfetchit}" ] ; then
# -f = fail without creating dummy, -O output local named like remoteza
echo use \"curl -f -O\" for fetching files
fetchit='curl -f -O '
oopt="--output"
# -f = fail without creating dummy
# --location to follow redirection
# use explicit --output as new hepforge URL is funky
####, -O output local named like remoteza
echo use \"curl -f --location ${oopt}\" for fetching files
fetchit='curl -f --location '
else
echo "Neither wget nor curl available -- can't download files"
exit 1
fi
fi

echo "$fetchit http://www.hepforge.org/archive/lhapdf/lhapdf-${major}.${minor}.${revis}.tar.gz"
$fetchit http://www.hepforge.org/archive/lhapdf/lhapdf-${major}.${minor}.${revis}.tar.gz
### example links
# https://lhapdf.hepforge.org/downloads/?f=old/lhapdf-5.7.0.tar.gz
# https://lhapdf.hepforge.org/downloads/?f=LHAPDF-6.5.6.tar.gz

tar xzvf lhapdf-${major}.${minor}.${revis}.tar.gz
mv lhapdf-${major}.${minor}.${revis} ${topdir}/src
if [ ${major} -eq 5 ]; then
basepath=lhapdf-${major}.${minor}.${revis}
tarfile=${basepath}.tar.gz
fetchpath="?f=old/${tarfile}"
else
basepath=LHAPDF-${major}.${minor}.${revis}
tarfile=${basepath}.tar.gz
fetchpath="?f=${tarfile}"
fi

echo "$fetchit ${oopt} ${tarfile} https://lhapdf.hepforge.org/downloads/${fetchpath}"
$fetchit ${oopt} ${tarfile} "https://lhapdf.hepforge.org/downloads/${fetchpath}"

tar xzvf ${tarfile}
mv ${basepath} ${topdir}/src
cd ${topdir}/src
./configure --prefix=${topdir}/stage/
make
Expand Down