File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -1437,12 +1437,23 @@ do
14371437done
14381438
14391439# Download the file
1440+ # Use GitHub releases for NC 32+ for faster downloads
1441+ # GitHub URL format: https://github.com/nextcloud-releases/server/releases/download/v{VERSION}/nextcloud-{VERSION}.tar.bz2
1442+ if [ " ${NCVERSION%% .* } " -ge 32 ]
1443+ then
1444+ NCGITHUB=" https://github.com/nextcloud-releases/server/releases/download"
1445+ DOWNLOAD_URL=" $NCGITHUB /v$NCVERSION /$STABLEVERSION .tar.bz2"
1446+ print_text_in_color " $ICyan " " Downloading $STABLEVERSION from GitHub releases (faster)..."
1447+ else
1448+ DOWNLOAD_URL=" $NCREPO /$STABLEVERSION .tar.bz2"
1449+ print_text_in_color " $ICyan " " Downloading $STABLEVERSION ..."
1450+ fi
1451+
14401452rm -f " $HTML /$STABLEVERSION .tar.bz2"
14411453cd $HTML
1442- print_text_in_color " $ICyan " " Downloading $STABLEVERSION ..."
14431454if network_ok
14441455then
1445- curl -fSLO --retry 3 " $NCREPO " / " $STABLEVERSION " .tar.bz2
1456+ curl -fSLO --retry 3 " $DOWNLOAD_URL "
14461457else
14471458 msg_box " There seems to be an issue with your network, please try again later.\nThis script will now exit."
14481459 exit 1
You can’t perform that action at this time.
0 commit comments