From 554f4d379555723fcceb13cf065a4cf48ab01b31 Mon Sep 17 00:00:00 2001 From: Daniel Hansson Date: Fri, 7 Oct 2022 14:13:48 +0200 Subject: make sure only versions below 15 reverse the order Signed-off-by: Daniel Hansson --- nextcloud_update.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nextcloud_update.sh b/nextcloud_update.sh index 12a90975..a2beb95f 100644 --- a/nextcloud_update.sh +++ b/nextcloud_update.sh @@ -705,7 +705,12 @@ then elif [ -f /tmp/nextmajor.version ] then NCBAD=$(cat /tmp/nextmajor.version) - NCVERSION=$(curl -s -m 900 $NCREPO/ | sed --silent 's/.*href="nextcloud-\([^"]\+\).zip.asc".*/\1/p' | sort --version-sort | grep $NCNEXT | head -1) + if [ "$NCNEXT" -lt "15" ] + then + NCVERSION=$(curl -s -m 900 $NCREPO/ | sed --silent 's/.*href="nextcloud-\([^"]\+\).zip.asc".*/\1/p' | sort --version-sort | grep $NCNEXT | head -1) + else + NCVERSION=$(curl -s -m 900 $NCREPO/ | sed --silent 's/.*href="nextcloud-\([^"]\+\).zip.asc".*/\1/p' | sort --version-sort | grep $NCNEXT | tail -1) + fi if [ -z "$NCVERSION" ] then msg_box "The version that you are trying to upgrade to doesn't exist." -- cgit v1.2.3