update_check.sh: extract launchpad project name from URL instead of guessing it.

This commit is contained in:
Christian Neukirchen 2014-11-01 19:43:55 +01:00
parent b1a9c64018
commit bcaeae6d24

View file

@ -28,7 +28,8 @@ update_check() {
*code.google.com*|*googlecode*)
url="http://code.google.com/p/$update_pkgname/downloads/list";;
*launchpad.net*)
url="https://launchpad.net/$update_pkgname/+download";;
lpname="$(printf %s "$url" | cut -d/ -f4)"
url="https://launchpad.net/$lpname/+download";;
*cpan.*)
update_pkgname=${update_pkgname#perl-};;
*pypi.python.org*)