update_check.sh: bitbucket.org support
This commit is contained in:
parent
655dc4eeb9
commit
8525392a11
1 changed files with 5 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
||||||
# vim: set ts=4 sw=4 et:
|
# vim: set ts=4 sw=4 et:
|
||||||
|
|
||||||
update_check() {
|
update_check() {
|
||||||
local i p url sfname lpname githubname rx found_version consider
|
local i p url sfname lpname bbname githubname rx found_version consider
|
||||||
|
|
||||||
if ! type curl >/dev/null 2>&1; then
|
if ! type curl >/dev/null 2>&1; then
|
||||||
echo "ERROR: cannot find \`curl' executable!"
|
echo "ERROR: cannot find \`curl' executable!"
|
||||||
|
@ -39,6 +39,10 @@ update_check() {
|
||||||
githubname="$(printf %s "$url" | cut -d/ -f4,5)"
|
githubname="$(printf %s "$url" | cut -d/ -f4,5)"
|
||||||
url="https://github.com/$githubname/tags"
|
url="https://github.com/$githubname/tags"
|
||||||
rx='/archive/(v?|\Q'"$update_pkgname"'\E-)?\K[\d\.]+(?=\.tar\.gz")';;
|
rx='/archive/(v?|\Q'"$update_pkgname"'\E-)?\K[\d\.]+(?=\.tar\.gz")';;
|
||||||
|
*bitbucket.org*)
|
||||||
|
bbname="$(printf %s "$url" | cut -d/ -f4,5)"
|
||||||
|
url="https://bitbucket.org/$bbname/downloads"
|
||||||
|
rx='/(get|downloads)/(v?|\Q'"$update_pkgname"'\E-)?\K[\d\.]+(?=\.tar\.gz")';;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue