xbps-src: improve update-check pattern for GitHub

This commit is contained in:
icp 2024-11-03 12:32:47 +05:30 committed by Duncan Overbruck
parent 3d9fe01989
commit cd51ef0c0e

View file

@ -139,7 +139,7 @@ update_check() {
*github.com*) *github.com*)
pkgurlname="$(printf %s "$url" | cut -d/ -f4,5)" pkgurlname="$(printf %s "$url" | cut -d/ -f4,5)"
url="https://github.com/$pkgurlname/tags" url="https://github.com/$pkgurlname/tags"
rx='/archive/refs/tags/(v?|\Q'"$pkgname"'\E[-_])?\K[\d.]+(?=\.tar\.gz")';; rx='/archive/refs/tags/(\Q'"$pkgname"'\E|[-_v])*\K[\d.]+(?=\.tar\.gz")';;
*//gitlab.*|*code.videolan.org*) *//gitlab.*|*code.videolan.org*)
case "$url" in case "$url" in
*/-/*) pkgurlname="$(printf %s "$url" | sed -e 's%/-/.*%%g; s%/$%%')";; */-/*) pkgurlname="$(printf %s "$url" | sed -e 's%/-/.*%%g; s%/$%%')";;