xbps-src/shutils/update_check.sh: add support for git.sr.ht
The code for `git.sr.ht` was almost identical to that of `hg.sr.ht`. The main difference, aside from replacing `hg.sr.ht` in `url` with `git.sr.ht`, was the endpoint of `url`. The `hg.sr.ht` url uses `tags` whereas `git.sr.ht` uses `refs`.
This commit is contained in:
parent
b0c88afc34
commit
ecc31ed587
1 changed files with 6 additions and 1 deletions
|
@ -57,7 +57,8 @@ update_check() {
|
||||||
*rubygems.org*|\
|
*rubygems.org*|\
|
||||||
*crates.io*|\
|
*crates.io*|\
|
||||||
*codeberg.org*|\
|
*codeberg.org*|\
|
||||||
*hg.sr.ht*)
|
*hg.sr.ht*|\
|
||||||
|
*git.sr.ht*)
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
@ -145,6 +146,10 @@ update_check() {
|
||||||
pkgurlname="$(printf %s "$url" | cut -d/ -f4,5)"
|
pkgurlname="$(printf %s "$url" | cut -d/ -f4,5)"
|
||||||
url="https://hg.sr.ht/$pkgurlname/tags"
|
url="https://hg.sr.ht/$pkgurlname/tags"
|
||||||
rx='/archive/(v?|\Q'"$pkgname"'\E-)?\K[\d\.]+(?=\.tar\.gz")';;
|
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")';;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue