From 05b135ba731c4080b23cf7ef8cd76b009d63cbf9 Mon Sep 17 00:00:00 2001 From: downtownallday Date: Wed, 4 May 2022 10:44:44 -0400 Subject: [PATCH] support nextcloud release candidate downloads --- setup/functions-downloads.sh | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/setup/functions-downloads.sh b/setup/functions-downloads.sh index 5e7676d1..347b78f4 100644 --- a/setup/functions-downloads.sh +++ b/setup/functions-downloads.sh @@ -294,13 +294,24 @@ get_nc_download_url() { if [ -z "$url" ]; then if [ -z "$ver" ]; then - url="https://download.nextcloud.com/server/releases/${REQUIRED_NC_FOR_FRESH_INSTALLS:-latest}.${ext#.}" - url_cache_id="${REQUIRED_NC_FOR_FRESH_INSTALLS:-latest}.${ext#.}" + ver=${REQUIRED_NC_FOR_FRESH_INSTALLS:-latest} + fi + + case "$ver" in + latest ) + url="https://download.nextcloud.com/server/releases/latest.${ext#.}" + url_cache_id="latest.${ext#.}" + ;; - else - url="https://download.nextcloud.com/server/releases/nextcloud-${ver}.${ext#.}" - url_cache_id="nextcloud-${ver}.${ext#.}" - fi + *rc* ) + url="https://download.nextcloud.com/server/prereleases/nextcloud-${ver}.${ext#.}" + url_cache_id="nextcloud-${ver}.${ext#.}" + ;; + + * ) + url="https://download.nextcloud.com/server/releases/nextcloud-${ver}.${ext#.}" + url_cache_id="nextcloud-${ver}.${ext#.}" + esac fi DOWNLOAD_URL="$url"