index : devops | |
Archlinux32 devs' convenience-scripts | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-07-25 10:15:20 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-07-25 10:15:20 +0200 |
commit | 6cc7120a7fdf6ef0777cd89ae0cfca3a87fbca83 (patch) | |
tree | 7a9e8068b0e805e3c2b36cff9e43f256a7394386 /watch-versions | |
parent | f29a56575b1296eb22d91d7e7de87a566bbb46ec (diff) |
-rwxr-xr-x | watch-versions | 28 |
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') |