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