Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/watch-versions
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-07-25 10:15:20 +0200
committerErich Eckner <git@eckner.net>2018-07-25 10:15:20 +0200
commit6cc7120a7fdf6ef0777cd89ae0cfca3a87fbca83 (patch)
tree7a9e8068b0e805e3c2b36cff9e43f256a7394386 /watch-versions
parentf29a56575b1296eb22d91d7e7de87a566bbb46ec (diff)
watch-versions: look in all remotes
Diffstat (limited to 'watch-versions')
-rwxr-xr-xwatch-versions28
1 files changed, 19 insertions, 9 deletions
diff --git a/watch-versions b/watch-versions
index 83c70df..2c519fa 100755
--- a/watch-versions
+++ b/watch-versions
@@ -26,16 +26,26 @@ pkgbase="$1"
unset pkgver
unset epoch
-eval "$(
- git -C "$(dirname "$0")/../packages" archive origin/master -- | \
- tar -Ox --wildcards '*/'"${pkgbase}"'/PKGBUILD' | \
- sed -n '
- /^epoch=/p
- /^pkgver=/p
+oldver=$(
+ git -C "$(dirname "$0")/../packages" remote | \
+ while read -r remote; do
+ eval "$(
+ git -C "$(dirname "$0")/../packages" archive "${remote}/master" -- 2>/dev/null | \
+ tar -Ox --wildcards '*/'"${pkgbase}"'/PKGBUILD' 2>/dev/null | \
+ sed -n '
+ /^epoch=/p
+ /^pkgver=/p
+ '
+ )"
+ printf '%s %s\n' "${epoch-0}" "${pkgver}"
+ done | \
+ sort -k1n,1 -k2V,2 | \
+ tail -n1 | \
+ sed '
+ s/^0\s\+//
+ s/\s\+/:/
'
-)"
-
-oldver="${epoch}${epoch+:}${pkgver}"
+)
case "${pkgbase}" in
'linux-pae')