fix dealing with elpa download issues

This commit is contained in:
edoapra 2026-07-06 11:32:21 -07:00
parent 4185dc300e
commit 2f194bfdf9
No known key found for this signature in database
GPG key ID: 9E6A0B70826967BA
2 changed files with 8 additions and 3 deletions

View file

@ -18,9 +18,10 @@ echo %%%%%%% debug make failures
arch=`uname -m`
source ../libext_utils/getfiles_utils.sh
get_elpa
if [ $? -ne 0 ]; then echo "elpa download failed" ; exit 1 ; fi
# version set in ../libext_utils/getfiles_utils.sh
echo mpif90 is `which mpif90`
tar xzvf elpa-*.tar.gz && rm elpa-*.tar.gz
tar xzf elpa-*.tar.gz && rm elpa-*.tar.gz
ln -sf elpa-* elpa
cd elpa
rm -f check_thread_affinity.patch

View file

@ -11,6 +11,7 @@ get_elpa(){
echo ELPA VERSION is $VERSION
if [ -f elpa-${VERSION}.tar.gz ]; then
echo "using existing" elpa-${VERSION}.tar.gz
return 0
else
rm -rf elpa*
ELPA_URL=("https://elpa.mpcdf.mpg.de/software/tarball-archive/Releases/${VERSION}/elpa-${VERSION}.tar.gz" \
@ -23,8 +24,11 @@ get_elpa(){
do
if [ "$tries" -gt 1 ]; then echo sleeping for 9s ;sleep 9; echo attempt no. $tries ; fi
curl -L --progress-bar $url -o elpa-${VERSION}.tar.gz
gzip -t elpa-${VERSION}.tar.gz >& /dev/null
if [ $? -eq 0 ]; then break ; fi
#echo checking gz integrity
if [ -f elpa-${VERSION}.tar.gz ]; then
gzip -t elpa-${VERSION}.tar.gz >& /dev/null
if [ $? -eq 0 ]; then break ; fi
fi
tries=$((tries+1))
done
gzip -t elpa-${VERSION}.tar.gz >& /dev/null