update-check: find versions with more components

This commit is contained in:
Piotr Wójcik 2019-06-29 17:03:32 +02:00 committed by Juan RP
parent f64ffec32e
commit c3cfeb56e8

View file

@ -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