git.sh: re-try git pull three times

mitigate jittery internet connections

Signed-off-by: Leah Rowe <leah@libreboot.org>
audit2
Leah Rowe 2024-07-17 16:55:05 +01:00 committed by Leah Rowe
parent 055c9be15b
commit 03c9670fef
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"