mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-03-25 13:29:03 +02:00
Merge branch 'master' into 25.04_branch
This commit is contained in:
@@ -89,30 +89,12 @@ fetch_submodule()
|
|||||||
|
|
||||||
tmpclone()
|
tmpclone()
|
||||||
{
|
{
|
||||||
livepull="n" && [ "$repofail" = "y" ] && \
|
[ -d "$3" ] && return 0
|
||||||
printf "Cached clone failed; trying online.\n" 1>&2 && livepull="y"
|
printf "Creating git clone '%s' from '%s', '%s'\n" "$3" "$1" "$2"
|
||||||
|
git clone "$1" "$3" || x_ rm -Rf "$3"
|
||||||
repofail="n"
|
[ -d "$3" ] || x_ git clone "$2" "$3"
|
||||||
|
x_ git -C "$3" reset --hard "$4"
|
||||||
[ $# -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" #
|
|
||||||
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"
|
|
||||||
git -C "$3" reset --hard "$4" || err "!reset $1 $2 $3 $4 $5"
|
|
||||||
fx_ "eval x_ git -C \"$3\" am" find "$5" -type f
|
fx_ "eval x_ git -C \"$3\" am" find "$5" -type f
|
||||||
) || repofail="y"
|
|
||||||
|
|
||||||
[ "$repofail" = "y" ] && [ $# -lt 6 ] && tmpclone "$@" retry
|
|
||||||
[ "$repofail" = "y" ] && err "!clone $1 $2 $3 $4 $5"; :
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nuke()
|
nuke()
|
||||||
|
|||||||
Reference in New Issue
Block a user