Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/vm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hansson <mailto@danielhansson.nu>2022-10-07 15:13:48 +0300
committerGitHub <noreply@github.com>2022-10-07 15:13:48 +0300
commit554f4d379555723fcceb13cf065a4cf48ab01b31 (patch)
tree54c76539ce226272414d0147f40276da1c548c2c
parent9e7d9e60ac37bf4de6df03ccf109e7c86e39dc6d (diff)
make sure only versions below 15 reverse the order
Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
-rw-r--r--nextcloud_update.sh7
1 files changed, 6 insertions, 1 deletions
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."