summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXZS2016-07-20 15:54:24 +0200
committerXZS2016-07-20 15:54:24 +0200
commit897eca88c619ffb0f4a2aaffcab40d8bdc50c51b (patch)
tree1c1f296e6dc258e5d2b05570e1753c55b4297ea5
parent3de65bd19e4c73fc57ac1c43d8c0e07f3dde424c (diff)
downloadaur-897eca88c619ffb0f4a2aaffcab40d8bdc50c51b.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 429197ec996..6c4185655e9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -41,7 +41,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"
}