diff options
author | XZS | 2016-05-12 01:14:42 +0200 |
---|---|---|
committer | XZS | 2016-05-12 01:14:42 +0200 |
commit | b6cd9bc84c0f038acfea94d39734cda0c1ac227d (patch) | |
tree | 4734906b24e1ac43727213399bf900fb8132e36e | |
parent | d514088aff54fe53be8630f0212fb5c5cc3ec9d9 (diff) | |
download | aur-b6cd9bc84c0f038acfea94d39734cda0c1ac227d.tar.gz |
derive URL from extension name
The description page for the Add-On follows a similar naming scheme as
the download link, so it can be automatically composed, too.
Only doing so when the $url is not yet set takes into account that the
Add-Ons may get a dedicated web page in the future. The conditional
would not be necessary as long as the $url would then be overwritten
afterwards. Nonetheless, it allows ordering the PKGBUILD in an usual
fashion: Automatic composition of values is semantically more suited to
be placed amongst the part of the PKGBUILD where prepare, build, package
and related functions are collected while the simple value assignment
belongs into the earlier block defining variables.
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -2,7 +2,7 @@ pkgbase = firefox-theme-ft-deepdark pkgdesc = Smooth dark theme for Firefox pkgver = 14.0.3 pkgrel = 1 - url = https://addons.mozilla.org/en-us/firefox/addon/ft-deepdark/ + url = https://addons.mozilla.org/firefox/addon/ft-deepdark/ arch = any license = custom:noncommercial makedepends = unzip @@ -6,7 +6,6 @@ pkgname=firefox-theme-ft-deepdark pkgver=14.0.3 pkgrel=1 pkgdesc='Smooth dark theme for Firefox' -url='https://addons.mozilla.org/en-us/firefox/addon/ft-deepdark/' license=('custom:noncommercial') md5sums=('6bd4cf826aae34f9fbcce6a2949ddf29') @@ -16,6 +15,7 @@ source+=( "${pkgname}.zip::https://addons.mozilla.org/firefox/downloads/latest/${_extname=${pkgname#*-*-}}/platform:2/" ".version::https://services.addons.mozilla.org/firefox/api/1.5/addon/$_extname" ) +[ ${url++} ] || url="https://addons.mozilla.org/${pkgname%%-*}/addon/$_extname/" md5sums+=('SKIP') noextract+=("${pkgname}.zip") makedepends+=(unzip) |