Browse Source
fix(mcb): update fails, as the site does a redirect and does not follow (#3047)
pull/3049/head
Christian
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
lgsm/functions/update_minecraft_bedrock.sh
|
|
@ -7,7 +7,7 @@ |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
|
|
|
|
fn_update_minecraft_dl(){ |
|
|
|
latestmcbuildurl=$(curl -s "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*zip') |
|
|
|
latestmcbuildurl=$(curl -Ls "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*zip') |
|
|
|
fn_fetch_file "${latestmcbuildurl}" "" "" "" "${tmpdir}" "bedrock_server.${remotebuild}.zip" |
|
|
|
echo -e "Extracting to ${serverfiles}...\c" |
|
|
|
if [ "${firstcommandname}" == "INSTALL" ]; then |
|
|
@ -77,7 +77,7 @@ fn_update_minecraft_localbuild(){ |
|
|
|
|
|
|
|
fn_update_minecraft_remotebuild(){ |
|
|
|
# Gets remote build info. |
|
|
|
remotebuild=$(curl -s "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*' | sed 's/.*\///' | grep -Eo "[.0-9]+[0-9]") |
|
|
|
remotebuild=$(curl -Ls "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*' | sed 's/.*\///' | grep -Eo "[.0-9]+[0-9]") |
|
|
|
if [ "${firstcommandname}" != "INSTALL" ]; then |
|
|
|
fn_print_dots "Checking remote build: ${remotelocation}" |
|
|
|
# Checks if remotebuild variable has been set. |
|
|
|