From c3cfeb56e8073074b77fad80fe95b98fa11e66ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Sat, 29 Jun 2019 17:03:32 +0200 Subject: [PATCH] update-check: find versions with more components --- common/xbps-src/shutils/update_check.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/xbps-src/shutils/update_check.sh b/common/xbps-src/shutils/update_check.sh index 445600a2fe9..e278fe90e34 100644 --- a/common/xbps-src/shutils/update_check.sh +++ b/common/xbps-src/shutils/update_check.sh @@ -78,7 +78,9 @@ update_check() { fi skipdirs= curl -A "xbps-src-update-check/$XBPS_SRC_VERSION" --max-time 10 -Lsk "$urlpfx" | - grep -Po -i "$rx" | sort -Vru | + grep -Po -i "$rx" | + # sort -V places 1.1/ before 1/, but 1A/ before 1.1A/ + sed -e 's:$:A:' -e 's:/A$:A/:' | sort -Vru | sed -e 's:A/$:/A:' -e 's:A$::' | while IFS= read -r newver; do newurl="${urlpfx}${newver}${urlsfx}" if [ "$newurl" = "$url" ]; then