msys2-runtime(update-patches.sh): configure the correct remote URL

When initializing the bare `msys2-runtime` repository that usually
`makepkg` would have initialized for us, do configure the remote URL
that subsequent `makepkg` runs will expect because of the one recorded
in `PKGBUILD`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin 2024-07-08 09:46:44 +02:00
parent 849b8fc2d7
commit a8b44d4f90

View File

@ -21,8 +21,10 @@ base_tag=refs/tags/cygwin-"$(sed -ne 's/^pkgver=//p' <PKGBUILD)"
msys2_branch=refs/heads/msys2-${base_tag#refs/tags/cygwin-}
url=https://github.com/msys2/msys2-runtime
test -d msys2-runtime ||
git clone --bare $url msys2-runtime ||
test -d msys2-runtime || {
git clone --bare $url msys2-runtime &&
git --git-dir=msys2-runtime config remote.origin.url git://sourceware.org/git/newlib-cygwin.git # required by PKGBUILD
} ||
die "Could not clone msys2-runtime"
git -C msys2-runtime fetch --no-tags $url $base_tag:$base_tag $msys2_branch:$msys2_branch