summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXZS2016-11-01 13:57:58 +0100
committerXZS2016-11-01 13:57:58 +0100
commit398ac4f5c1f821932301ae6af6de5e331fe236d8 (patch)
tree81cdf20c0e56cf96ba3a9f7326f4372b4d6fa769
parentd453ace73a77ef14a7a67dbf8826968d71b1ef6b (diff)
downloadaur-398ac4f5c1f821932301ae6af6de5e331fe236d8.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.
-rw-r--r--PKGBUILD3
1 files changed, 2 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index dea18d43a78b..c6f958e6988e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -53,7 +53,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"
}