xbps-src/update-check: add codeberg support

This commit is contained in:
Isaac Freund 2020-08-17 12:51:35 +02:00 committed by Piotr
parent 3d035237ac
commit 5de1503434

View file

@ -56,6 +56,7 @@ update_check() {
*cran.r-project.org/src/contrib*|\ *cran.r-project.org/src/contrib*|\
*rubygems.org*|\ *rubygems.org*|\
*crates.io*|\ *crates.io*|\
*codeberg.org*|\
*hg.sr.ht*) *hg.sr.ht*)
continue continue
;; ;;
@ -136,6 +137,10 @@ update_check() {
*crates.io*) *crates.io*)
url="https://crates.io/api/v1/crates/${pkgname#rust-}" url="https://crates.io/api/v1/crates/${pkgname#rust-}"
rx='/crates/'${pkgname#rust-}'/\K[0-9.]*(?=/download)' ;; rx='/crates/'${pkgname#rust-}'/\K[0-9.]*(?=/download)' ;;
*codeberg.org*)
pkgurlname="$(printf %s "$url" | cut -d/ -f4,5)"
url="https://codeberg.org/$pkgurlname/releases"
rx='/archive/\K[\d\.]+(?=\.tar\.gz)' ;;
*hg.sr.ht*) *hg.sr.ht*)
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"