Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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')