fetch-lua follow-up
This commit is contained in:
+19
-16
@@ -324,26 +324,29 @@ fetch-lua: fetch-Lua
|
|||||||
fetch-Lua:
|
fetch-Lua:
|
||||||
@( mkdir -p lib && cd lib && \
|
@( mkdir -p lib && cd lib && \
|
||||||
n=0; \
|
n=0; \
|
||||||
|
export curlstatus=1; \
|
||||||
luaurl=https://$(LUA_URL)/lua-$(LUA_VERSION).tar.gz; \
|
luaurl=https://$(LUA_URL)/lua-$(LUA_VERSION).tar.gz; \
|
||||||
while [ $${n} -lt 2 ]; do \
|
while [ $${n} -lt 2 ]; do \
|
||||||
echo trying $$luaurl; \
|
if [ $$curlstatus -ne 0 ]; then \
|
||||||
shac1=`command -v shasum`; \
|
echo trying $$luaurl; \
|
||||||
shac2=`command -v sha256sum`; \
|
shac1=`command -v shasum`; \
|
||||||
if [ ! -z $$shac1 ]; then \
|
shac2=`command -v sha256sum`; \
|
||||||
shac="$$shac1 -a 256"; elif [ ! -z $$shac2 ]; then \
|
if [ ! -z $$shac1 ]; then \
|
||||||
shac=$$shac2; else echo "CAUTION: no way to check integrity"; \
|
shac="$$shac1 -a 256"; elif [ ! -z $$shac2 ]; then \
|
||||||
fi; \
|
shac=$$shac2; else echo "CAUTION: no way to check integrity"; \
|
||||||
curl -R -O $$luaurl; \
|
|
||||||
export curlstatus=$$?; \
|
|
||||||
if [ $$curlstatus -eq 0 ]; then \
|
|
||||||
if [ ! -z "$$shac" ]; then \
|
|
||||||
echo Checking integrity with $$shac; \
|
|
||||||
$$shac -w -c ../submodules/CHKSUMS < lua-$(LUA_VERSION).tar.gz; \
|
|
||||||
fi; \
|
fi; \
|
||||||
tar zxf lua-$(LUA_VERSION).tar.gz && \
|
curl -R -O $$luaurl; \
|
||||||
rm -f lua-$(LUA_VERSION).tar.gz; \
|
export curlstatus=$$?; \
|
||||||
|
if [ $$curlstatus -eq 0 ]; then \
|
||||||
|
if [ ! -z "$$shac" ]; then \
|
||||||
|
echo Checking integrity with $$shac; \
|
||||||
|
$$shac -w -c ../submodules/CHKSUMS < lua-$(LUA_VERSION).tar.gz; \
|
||||||
|
fi; \
|
||||||
|
tar zxf lua-$(LUA_VERSION).tar.gz && \
|
||||||
|
rm -f lua-$(LUA_VERSION).tar.gz; \
|
||||||
|
fi; \
|
||||||
|
luaurl=https://$(LUA_URL_MIRROR)/lua-$(LUA_VERSION).tar.gz; \
|
||||||
fi; \
|
fi; \
|
||||||
luaurl=https://$(LUA_URL_MIRROR)/lua-$(LUA_VERSION).tar.gz; \
|
|
||||||
n=`expr $$n + 1`; \
|
n=`expr $$n + 1`; \
|
||||||
done; \
|
done; \
|
||||||
true )
|
true )
|
||||||
|
|||||||
Reference in New Issue
Block a user