summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXZS2016-07-20 15:54:18 +0200
committerXZS2016-07-20 15:54:18 +0200
commitfd228862cc5a13da9a2097c4d1a4fc11ac8fd065 (patch)
treef51e1aa37403c64c4f87c16332e8af33be1ceac4
parentf3843c46789b507df5b7dd6dcc01c3cca6e078bf (diff)
downloadaur-fd228862cc5a13da9a2097c4d1a4fc11ac8fd065.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 9b8cadb855c..fba7c8c1f6f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -38,7 +38,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"
}