summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXZS2016-07-20 15:53:50 +0200
committerXZS2016-07-20 15:53:50 +0200
commit8d4b28320f9f44261a475fdbe8a9d51bc9bc9558 (patch)
tree939393ecb6af77d1c6b34ccdf778d77edec0c87f
parent0e1e4be3a13dcd95fd268bf7be0a1f228e001aad (diff)
downloadaur-8d4b28320f9f44261a475fdbe8a9d51bc9bc9558.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.
-rw-r--r--PKGBUILD2
1 files changed, 1 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 1e3a8f95bb2c..7b064577536e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -30,7 +30,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"
}