refs #796 retry git-clone

pull/22/head
Natalia Serrano 2024-09-30 13:05:33 +02:00
parent d54360b1dc
commit 3875322f61
1 changed files with 13 additions and 1 deletions

View File

@ -866,7 +866,19 @@ function downloadCode()
echoAndLog "${FUNCNAME}(): downloading code from '$url'..."
GIT_SSL_NO_VERIFY=1 GIT_CURL_VERBOSE=1 git clone --verbose $url
RETRIES=5
DELAY=4
COUNT=1
while [ $COUNT -lt $RETRIES ]; do
GIT_SSL_NO_VERIFY=1 GIT_CURL_VERBOSE=1 git clone --verbose $url
if [ $? -eq 0 ]; then
RETRIES=0
break
fi
let COUNT=$COUNT+1
sleep $DELAY
done
if [ $? -ne 0 ]; then
errorAndLog "${FUNCNAME}(): error getting OpenGnsys code from $url"
return 1