diff options
author | Leah Rowe <leah@libreboot.org> | 2024-09-30 09:35:46 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2024-09-30 09:35:46 +0100 |
commit | 02e76d09c1c91ca09c3487259b769ebd85c1915d (patch) | |
tree | 101eb616047df16bec30208287237390f484ff6a /include/git.sh | |
parent | a42fe72c93e3a20db55fe571d8d8b0e586102e28 (diff) |
add swig to fedora dependencies
needed when compiling u-boot
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/git.sh')
-rw-r--r-- | include/git.sh | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/include/git.sh b/include/git.sh index 8c86b4c2..0c2f7acc 100644 --- a/include/git.sh +++ b/include/git.sh @@ -91,21 +91,24 @@ fetch_submodule() "$mdir/${1##*/}/patches" } +livepull="n" tmpclone() { [ "$repofail" = "y" ] && \ - printf "Cached clone failed; trying online.\n" 1>&2; repofail="n" + printf "Cached clone failed; trying online.\n" 1>&2 && livepull="y" + + repofail="n" [ $# -lt 6 ] || rm -Rf "$3" || $err "git retry: !rm $3 ($1)" repodir="$XBMK_CACHE/repo/${1##*/}" && [ $# -gt 5 ] && repodir="$3" mkdir -p "$XBMK_CACHE/repo" || $err "!rmdir $XBMK_CACHE/repo" - if [ -d "$repodir" ] && [ $# -lt 6 ]; then - git -C "$repodir" pull || sleep 3 || git -C "$repodir" pull \ - || sleep 3 || git -C "$repodir" pull || : - else + if [ "$livepull" = "y" ]; then git clone $1 "$repodir" || git clone $2 "$repodir" || \ $err "!clone $1 $2 $repodir $4 $5" + elif [ -d "$repodir" ] && [ $# -lt 6 ]; then + git -C "$repodir" pull || sleep 3 || git -C "$repodir" pull \ + || sleep 3 || git -C "$repodir" pull || : fi ( [ $# -gt 5 ] || git clone "$repodir" "$3" || $err "!clone $repodir $3" |