summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorXZS2016-11-04 15:05:45 +0100
committerXZS2016-11-04 15:05:45 +0100
commit5d21936503ed0f5e794713ec235403f3f8bbe2f9 (patch)
tree0e8ff289ca5b77f9183e1fc6533eee59f13050c0 /PKGBUILD
parent59c54a84772f512ef7cb340172a318cc61aaa02c (diff)
downloadaur-5d21936503ed0f5e794713ec235403f3f8bbe2f9.tar.gz
externalize meta-data query to function
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD8
1 files changed, 6 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 45730ed697d0..0a23448814b1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -27,8 +27,12 @@ DLAGENTS=("meta::/usr/bin/bash -c $(
)\ |\ jq\ -j\ '.files.\"0\"'\ |\ sed\ '/downloaded/d'\ >\ %o"
"${DLAGENTS[@]}")
+meta() {
+ jq -j ".$1" meta
+}
+
pkgver() {
- js -j '.version' meta
+ meta version
while read -rd $'\0'
do
if [[ "$REPLY" -gt "$max" ]]
@@ -47,5 +51,5 @@ package() {
# Hidden in a subfunction not to show up in the .SRCINFO.
extend-optdepends() {
- optdepends+=("gnome-shell=$(jq -j .version meta): for gnome-shell themes")
+ optdepends+=("gnome-shell=$(meta version): for gnome-shell themes")
}