make sure only versions below 15 reverse the order

Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
This commit is contained in:
Daniel Hansson 2022-10-07 14:13:48 +02:00 committed by GitHub
parent 9e7d9e60ac
commit 554f4d3795
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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