git.sh: re-try git pull three times

mitigate jittery internet connections

Signed-off-by: Leah Rowe <leah@libreboot.org>
audit6
Leah Rowe 2024-07-17 16:55:05 +01:00
parent 0b9cd77fe7
commit 0cd52fc7fd
1 changed files with 2 additions and 1 deletions

View File

@ -103,7 +103,8 @@ tmpclone()
repodir="repo/${1##*/}"
x_ mkdir -p "repo"
if [ -d "$repodir" ]; then
git -C "$repodir" pull || :
git -C "$repodir" pull || sleep 3 || git -C "$repodir" pull \
|| sleep 3 || git -C "$repodir" pull :
else
git clone $1 "$repodir" || git clone $2 "$repodir" || \
$err "!clone $1 $2 $repodir $4 $5"