common/xbps-src/shutils/update_check.sh: tweak url and rx for git.sr.ht

Accommodate for tarballs in refs named after commit hash.
This commit is contained in:
icp 2022-11-06 15:12:41 +05:30 committed by classabbyamp
parent e46b70f723
commit 5f0e7218eb

View file

@ -167,8 +167,8 @@ update_check() {
rx='/archive/(v?|\Q'"$pkgname"'\E-)?\K[\d.]+(?=\.tar\.gz")';;
*git.sr.ht*)
pkgurlname="$(printf %s "$url" | cut -d/ -f4,5)"
url="https://git.sr.ht/$pkgurlname/refs"
rx='/archive/(v?|\Q'"$pkgname"'\E-)?\K[\d.]+(?=\.tar\.gz")';;
url="https://git.sr.ht/$pkgurlname/refs/rss.xml"
rx='<guid>\Q'"${url%/*}"'\E/(v-?|\Q'"$pkgname"'\E-)?\K[\d.]+(?=</guid>)' ;;
*pkgs.fedoraproject.org*)
url="https://pkgs.fedoraproject.org/repo/pkgs/$pkgname" ;;
esac