Skip to content

Commit 251e11f

Browse files
authored
Prepare pacman helper for ucrt64 (#706)
Some more preparation work for git-for-windows/git#3167. We still need an initial `git-for-windows-ucrt64.db.tar.xz` in https://github.com/git-for-windows/pacman-repo/tree/x86_64 before this can work, though.
2 parents 4aa6327 + 1d772da commit 251e11f

1 file changed

Lines changed: 21 additions & 21 deletions

File tree

pacman-helper.sh

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,6 @@ arch_url () { # <architecture>
7676
echo "$base_url/$(map_arch $1)"
7777
}
7878

79-
arch_to_mingw () { # <arch>
80-
case "$arch" in
81-
i686) echo mingw32;;
82-
aarch64) echo aarch64;;
83-
*) echo mingw64;;
84-
esac
85-
}
86-
8779
package_list () { # db.tar.xz
8880
tar tf "$1" |
8981
sed -ne '/ /d' -e 's/\/$//p'
@@ -257,6 +249,7 @@ quick_action () { # <action> <file>...
257249
mingw-w64-*.pkg.tar.xz|mingw-w64-*.pkg.tar.zst)
258250
arch=${file##mingw-w64-}
259251
arch=${arch#clang-}
252+
arch=${arch#ucrt-}
260253
arch=${arch%%-*}
261254
key=${arch}_mingw
262255
;;
@@ -291,10 +284,11 @@ quick_action () { # <action> <file>...
291284
file=${file%-[0-9]*-[0-9]*}
292285
key=${arch}_msys
293286
;;
294-
mingw-w64-i686-*|mingw-w64-x86_64-*|mingw-w64-clang-aarch64-*)
287+
mingw-w64-i686-*|mingw-w64-x86_64-*|mingw-w64-ucrt-x86_64-*|mingw-w64-clang-aarch64-*)
295288
test remove = "$label" || die "Cannot add $path"
296289
arch=${file#mingw-w64-}
297290
arch=${arch#clang-}
291+
arch=${arch#ucrt-}
298292
arch=${arch%%-*}
299293
file=${file%-any}
300294
file=${file%-[0-9]*-[0-9]*}
@@ -375,9 +369,12 @@ quick_action () { # <action> <file>...
375369
*,) db2=;;
376370
i686,*) db2=mingw32;;
377371
*aarch64*) db2=clangarm64;;
378-
*) db2=mingw64;;
372+
*)
373+
db2=mingw64
374+
db3=ucrt64
375+
;;
379376
esac
380-
for db in git-for-windows-$arch ${db2:+git-for-windows-$db2}
377+
for db in git-for-windows-$arch ${db2:+git-for-windows-$db2} ${db3:+git-for-windows-$db3}
381378
do
382379
# The Pacman repository on Azure Blobs still uses the old naming scheme
383380
case "$db" in
@@ -427,17 +424,20 @@ quick_action () { # <action> <file>...
427424
cp git-for-windows-$arch.db.tar.xz.sig git-for-windows-$arch.db.sig
428425
}
429426
} &&
430-
if test -n "$db2"
431-
then
432-
$action $sign_option git-for-windows-$db2.db.tar.xz $mingw &&
433-
{ test ! -h git-for-windows-$db2.db || rm git-for-windows-$db2.db; } &&
434-
cp git-for-windows-$db2.db.tar.xz git-for-windows-$db2.db && {
435-
test -z "$sign_option" || {
436-
{ test ! -h git-for-windows-$db2.db.sig || rm git-for-windows-$db2.db.sig; } &&
437-
cp git-for-windows-$db2.db.tar.xz.sig git-for-windows-$db2.db.sig
427+
for db in $db2 $db3
428+
do
429+
if test -n "$db"
430+
then
431+
$action $sign_option git-for-windows-$db.db.tar.xz $mingw &&
432+
{ test ! -h git-for-windows-$db.db || rm git-for-windows-$db.db; } &&
433+
cp git-for-windows-$db.db.tar.xz git-for-windows-$db.db && {
434+
test -z "$sign_option" || {
435+
{ test ! -h git-for-windows-$db.db.sig || rm git-for-windows-$db.db.sig; } &&
436+
cp git-for-windows-$db.db.tar.xz.sig git-for-windows-$db.db.sig
437+
}
438438
}
439-
}
440-
fi &&
439+
fi
440+
done &&
441441

442442
# Remove the existing versions from the Git branch
443443
printf '%s\n' $msys $mingw |

0 commit comments

Comments
 (0)