Improve curl with retry on error

Improve curl with retry on error

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
2021-08-06 01:17:47 +02:00
parent 77da067e8e
commit 501b1b84dc
7 changed files with 59 additions and 9 deletions

View File

@ -38,7 +38,12 @@ cd /usr/src
CMAKE_ROOT=cmake-${CMAKE_VERSION}-Centos5-${ARCH}
url=https://github.com/dockbuild/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_ROOT}.tar.gz
echo "Downloading $url"
curl -# -LO $url
curl --connect-timeout 30 \
--max-time 10 \
--retry 5 \
--retry-delay 10 \
--retry-max-time 30 \
-# -LO $url
tar -xzvf ${CMAKE_ROOT}.tar.gz
rm -f ${CMAKE_ROOT}.tar.gz