summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorXZS2016-07-20 15:57:30 +0200
committerXZS2016-07-20 15:57:30 +0200
commit29df21f72151ef2d70d10522b18c3a6e256ca7cd (patch)
treec48c71611fca0abbcc3ac6aa89d64ade25794355 /PKGBUILD
parent664b278f4b4aa82eafeeca3747666fd9c73fad8d (diff)
downloadaur-29df21f72151ef2d70d10522b18c3a6e256ca7cd.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 c917b276135..fb30d213892 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"
}