mirror of https://gitlab.com/QEF/q-e.git
Fix needed to deal with awful URL generated by QE-FORGE
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@12934 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
parent
7757328be1
commit
3d761c6060
|
@ -17,16 +17,17 @@
|
|||
###########################################################
|
||||
|
||||
define download_and_unpack
|
||||
@(if test ! -s ../archive/`echo "$(2)" | sed 's/.*\///'` && test ! -d ../$(1) ; then \
|
||||
wget -O ../archive/`echo "$(2)" | sed 's/.*\///'` $(2) > /dev/null 2>&1; \
|
||||
@extracted_namefile=`echo "$(2)" | sed 's/.*\///' | sed 's/.*=//'`
|
||||
@(if test ! -s ../archive/$extracted_namefile && test ! -d ../$(3) ; then \
|
||||
wget -O ../archive/$extracted_namefile $(2) > /dev/null 2>&1; \
|
||||
if test "`echo $$?`" -ne "0" ; then \
|
||||
curl -o ../archive/`echo "$(2)" | sed 's/.*\///'` $(2) > /dev/null 2>&1; \
|
||||
curl -o ../archive/$extracted_namefile $(2) > /dev/null 2>&1; \
|
||||
if test "`echo $$?`" -ne "0" ; then \
|
||||
echo "*** Unable to download $(4). Test whether curl or wget is installed and working," ; \
|
||||
echo "*** if you have direct access to internet. If not, copy into archive/ the file" ; \
|
||||
echo "*** ${package_name##*/}" ; \
|
||||
echo "*** $extracted_namefile" ; \
|
||||
exit 1 ; fi ; fi ; fi)
|
||||
if test ! -d ../$(1); then \
|
||||
(gzip -dc ../archive/`echo "$(2)" | sed 's/.*\///'` | \
|
||||
if test ! -d ../$(3); then \
|
||||
(gzip -dc ../archive/$extracted_namefile | \
|
||||
(cd ../ ; tar -xvf - ; ln -s $(1) $(3)) ) ; fi
|
||||
endef
|
||||
|
|
Loading…
Reference in New Issue