summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorXZS2016-11-01 13:59:07 +0100
committerXZS2016-11-01 13:59:07 +0100
commit2070198574b7461088c2937970f4c7ab92b314fb (patch)
tree40bc9391cf25558152c5995c8c646e152fc63db3 /PKGBUILD
parentf1ae014ee09c322f6f18985bf3441927ab6566cc (diff)
downloadaur-2070198574b7461088c2937970f4c7ab92b314fb.tar.gz
choose newest extension source
Some extensions authors introduce build steps required before installing. Their execution normally produces a completed variant of the extension code in a subdirectory, difficult to tell apart from the original source. The find condition introduced herein proves the process against such cases to come. It always chooses the files created last, ensuring that a build which occurred after mere unpacking will always take precedence.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD3
1 files changed, 2 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 63373898026..de500cebac0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -34,7 +34,8 @@ package() {
}
package_01_locate() {
msg2 'Locating extension...'
- cd "$(find -name 'metadata.json' -execdir test -e extension.js \; -printf %h -quit)"
+ cd "$(find -name 'metadata.json' -execdir test -e extension.js \; \
+ -printf '%C@ %h\n' | sort -nr | sed 's/^.* //;q' )"
extname=$(grep -Po '(?<="uuid": ")[^"]*' metadata.json)
destdir="$pkgdir/usr/share/gnome-shell/extensions/$extname"
}