summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXZS2016-07-20 15:53:57 +0200
committerXZS2016-07-20 15:53:57 +0200
commiteccc99916c855625194f3a27bf803449e0e8c741 (patch)
tree72f9e4ed912280da4f27556603372fc9c34a818a
parentda1de0999ef1371311f60dcedad7042b0c0435ff (diff)
downloadaur-eccc99916c855625194f3a27bf803449e0e8c741.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 87c73c3f7bd2..e318b28f9894 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -29,7 +29,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"
}