From 6cc7120a7fdf6ef0777cd89ae0cfca3a87fbca83 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 25 Jul 2018 10:15:20 +0200 Subject: watch-versions: look in all remotes --- watch-versions | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'watch-versions') 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') -- cgit v1.2.3-70-g09d2