diff options
author | Leah Rowe <leah@libreboot.org> | 2025-04-18 01:52:44 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-04-18 01:52:44 +0100 |
commit | e63d8dd20d99ec18ef03699516fd800a81b7f1df (patch) | |
tree | 97c1b0b418f6b7f0a1cf383df3d8ab1f99619b74 /include | |
parent | 11078508a25a6d4b58de8b4364780929b87ef6e6 (diff) |
git.sh: minor cleanup
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/git.sh | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/include/git.sh b/include/git.sh index 4fa904ba..74942414 100644 --- a/include/git.sh +++ b/include/git.sh @@ -99,24 +99,21 @@ fetch_submodule() tmpclone() { - livepull="n" && [ "$repofail" = "y" ] && \ - printf "Cached clone failed; trying online.\n" 1>&2 && livepull="y" - - repofail="n" + eval "`setvars "n" livepull repofail`" + [ "$repofail" = "y" ] && livepull="y" [ $# -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 [ "$livepull" = "y" ] && [ ! -d "$repodir" ]; then - git clone "$1" "$repodir" || git clone $2 "$repodir" || \ - $err "!clone $1 $2 $repodir $4 $5" # + git clone "$1" "$repodir" || x_ git clone $2 "$repodir" 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" + [ $# -gt 5 ] || x_ git clone "$repodir" "$3" git -C "$3" reset --hard "$4" || $err "!reset $1 $2 $3 $4 $5" git_am_patches "$3" "$5" ) || repofail="y" |