Add hg.sr.ht to update_check.sh
hg.sr.ht project pages are laid out quite closely to GitHubs format. We can basically clone the check for GitHub to a new base URL of hg.sr.ht .
This commit is contained in:
parent
f3ee486a57
commit
b7389f26af
|
@ -55,7 +55,8 @@ update_check() {
|
||||||
*kernel.org/pub/linux/kernel/*|\
|
*kernel.org/pub/linux/kernel/*|\
|
||||||
*cran.r-project.org/src/contrib*|\
|
*cran.r-project.org/src/contrib*|\
|
||||||
*rubygems.org*|\
|
*rubygems.org*|\
|
||||||
*crates.io*)
|
*crates.io*|\
|
||||||
|
*hg.sr.ht*)
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
@ -135,6 +136,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)' ;;
|
||||||
|
*hg.sr.ht*)
|
||||||
|
hgsrhtname="$(printf %s "$url" | cut -d/ -f4,5)"
|
||||||
|
url="https://hg.sr.ht/$hgsrhtname/tags"
|
||||||
|
rx='/archive/(v?|\Q'"$pkgname"'\E-)?\K[\d\.]+(?=\.tar\.gz")';;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue