summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorXZS2016-07-20 15:54:03 +0200
committerXZS2016-07-20 15:54:03 +0200
commit52ec42ed8e7af2c9b0b3ce1526629e5cc67587fe (patch)
tree8f69666b6e41fb59170c08de9b4cb75a8d1cb04e /PKGBUILD
parent19b6416f2c3791daffb6adeeafed948d89574cf0 (diff)
downloadaur-52ec42ed8e7af2c9b0b3ce1526629e5cc67587fe.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 1295136838c3..0c0418d3af24 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -31,7 +31,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"
}