summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorXZS2016-07-20 15:57:37 +0200
committerXZS2016-07-20 15:57:37 +0200
commit991fa6c969f60658856a868442c126cb5e4e8c69 (patch)
tree48df5fa6fd2d55f257d6315b23da3e3a6f5687c2 /PKGBUILD
parentb1a375abe487ac465e9010efd4e722b4eae14171 (diff)
downloadaur-991fa6c969f60658856a868442c126cb5e4e8c69.tar.gz
improve location metric
As an extension consists of both the metadata description and a JavaScript entry point always named extension.js, searching for both hardens the locating process against changes to the directory structure. This does not change the contents of the built package, so the pkgver stays unchanged.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD2
1 files changed, 1 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index ae0e771ae4a7..e6e54f8d27b1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -54,7 +54,7 @@ package() {
}
package_01_locate() {
msg2 'Locating extension...'
- cd "$(dirname $(find -name 'metadata.json' -print -quit))"
+ cd "$(find -name 'metadata.json' -execdir test -e extension.js \; -printf %h -quit)"
extname=$(grep -Po '(?<="uuid": ")[^"]*' metadata.json)
destdir="$pkgdir/usr/share/gnome-shell/extensions/$extname"
}