mirror of
https://github.com/bol-van/zapret2.git
synced 2026-10-29 06:02:05 +00:00
builder-linux: curl download retries and timeouts
This commit is contained in:
1 parent
4759d64c27
commit
d1b80a4254
5 files changed
+11
-9
No files matched your search
@@ -11,17 +11,17 @@ dl_deps()
|
|||||||
(
|
(
|
||||||
cd "$DEPS"
|
cd "$DEPS"
|
||||||
exists_dir libnfnetlink-* ||
|
exists_dir libnfnetlink-* ||
|
||||||
curl -Lo - https://www.netfilter.org/pub/libnfnetlink/libnfnetlink-1.0.2.tar.bz2 | tar -xj || exit 5
|
curl $CURL_OPT -Lo - https://www.netfilter.org/pub/libnfnetlink/libnfnetlink-1.0.2.tar.bz2 | tar -xj || exit 5
|
||||||
exists_dir libmnl-* ||
|
exists_dir libmnl-* ||
|
||||||
curl -Lo - https://www.netfilter.org/pub/libmnl/libmnl-1.0.5.tar.bz2 | tar -xj || exit 5
|
curl $CURL_OPT -Lo - https://www.netfilter.org/pub/libmnl/libmnl-1.0.5.tar.bz2 | tar -xj || exit 5
|
||||||
exists_dir libnetfilter_queue-* ||
|
exists_dir libnetfilter_queue-* ||
|
||||||
curl -Lo - https://www.netfilter.org/pub/libnetfilter_queue/libnetfilter_queue-1.0.5.tar.bz2 | tar -xj || exit 5
|
curl $CURL_OPT -Lo - https://www.netfilter.org/pub/libnetfilter_queue/libnetfilter_queue-1.0.5.tar.bz2 | tar -xj || exit 5
|
||||||
exists_dir zlib-* ||
|
exists_dir zlib-* ||
|
||||||
curl -Lo - https://zlib.net/fossils/zlib-1.3.2.tar.gz | tar -xz || exit 5
|
curl $CURL_OPT -Lo - https://zlib.net/fossils/zlib-1.3.2.tar.gz | tar -xz || exit 5
|
||||||
exists_dir luajit2-* ||
|
exists_dir luajit2-* ||
|
||||||
curl -Lo - https://github.com/openresty/luajit2/archive/refs/tags/v${LUAJIT_RELEASE}.tar.gz | tar -xz || exit 5
|
curl $CURL_OPT -Lo - https://github.com/openresty/luajit2/archive/refs/tags/v${LUAJIT_RELEASE}.tar.gz | tar -xz || exit 5
|
||||||
exists_dir lua-* ||
|
exists_dir lua-* ||
|
||||||
curl -Lo - https://www.lua.org/ftp/lua-${LUA_RELEASE}.tar.gz | tar -xz || exit 5
|
curl $CURL_OPT -Lo - https://www.lua.org/ftp/lua-${LUA_RELEASE}.tar.gz | tar -xz || exit 5
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ dl_zapret1()
|
|||||||
fi
|
fi
|
||||||
(
|
(
|
||||||
cd "$ZBASE"
|
cd "$ZBASE"
|
||||||
curl -Lo /tmp/zapret.zip "$ZURL"
|
curl $CURL_OPT -Lo /tmp/zapret.zip "$ZURL"
|
||||||
unzip /tmp/zapret.zip
|
unzip /tmp/zapret.zip
|
||||||
rm /tmp/zapret.zip
|
rm /tmp/zapret.zip
|
||||||
mv zapret-${BRANCH} $ZDIR
|
mv zapret-${BRANCH} $ZDIR
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ dl_zapret2()
|
|||||||
fi
|
fi
|
||||||
(
|
(
|
||||||
cd "$ZBASE"
|
cd "$ZBASE"
|
||||||
curl -Lo /tmp/zapret2.zip "$ZURL"
|
curl $CURL_OPT -Lo /tmp/zapret2.zip "$ZURL"
|
||||||
unzip /tmp/zapret2.zip
|
unzip /tmp/zapret2.zip
|
||||||
rm /tmp/zapret2.zip
|
rm /tmp/zapret2.zip
|
||||||
mv zapret2-${BRANCH} $ZDIR
|
mv zapret2-${BRANCH} $ZDIR
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
EXEDIR="$(dirname "$0")"
|
EXEDIR="$(dirname "$0")"
|
||||||
EXEDIR="$(cd "$EXEDIR"; pwd)"
|
EXEDIR="$(cd "$EXEDIR"; pwd)"
|
||||||
|
|
||||||
|
CURL_OPT="--connect-timeout 5 --max-time 120 --retry 5 --retry-delay 30"
|
||||||
|
|
||||||
TOOLCHAINS="$EXEDIR/toolchain"
|
TOOLCHAINS="$EXEDIR/toolchain"
|
||||||
DEPS="$EXEDIR/deps"
|
DEPS="$EXEDIR/deps"
|
||||||
STAGE="$EXEDIR/staging"
|
STAGE="$EXEDIR/staging"
|
||||||
|
|||||||
@@ -17,6 +17,6 @@ ask_target 1
|
|||||||
cd "$TOOLCHAINS"
|
cd "$TOOLCHAINS"
|
||||||
for t in $TGT; do
|
for t in $TGT; do
|
||||||
[ -d "$t" ] && rm -r "$t"
|
[ -d "$t" ] && rm -r "$t"
|
||||||
curl -Lo - "${BASEURL}/${t}.tar.xz" | tar -Jx
|
curl $CURL_OPT -Lo - "${BASEURL}/${t}.tar.xz" | tar -Jx
|
||||||
done
|
done
|
||||||
)
|
)
|
||||||
Reference in new issue
Block a user