|
|
@ -10,7 +10,7 @@ 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') |
|
|
|
fn_fetch_file "${latestmcbuildurl}" "" "" "" "${tmpdir}" "bedrock_server.${remotebuild}.zip" |
|
|
|
echo -e "Extracting to ${serverfiles}...\c" |
|
|
|
if [ "${installer}" == "1" ]; then |
|
|
|
if [ "${firstcommandname}" == "INSTALL" ]; then |
|
|
|
unzip -oq "${tmpdir}/bedrock_server.${remotebuild}.zip" -x "server.properties" -d "${serverfiles}" |
|
|
|
else |
|
|
|
unzip -oq "${tmpdir}/bedrock_server.${remotebuild}.zip" -x "permissions.json" "server.properties" "whitelist.json" -d "${serverfiles}" |
|
|
@ -78,7 +78,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]") |
|
|
|
if [ "${installer}" != "1" ]; then |
|
|
|
if [ "${firstcommandname}" != "INSTALL" ]; then |
|
|
|
fn_print_dots "Checking remote build: ${remotelocation}" |
|
|
|
# Checks if remotebuild variable has been set. |
|
|
|
if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then |
|
|
@ -158,7 +158,7 @@ fn_update_minecraft_compare(){ |
|
|
|
# The location where the builds are checked and downloaded. |
|
|
|
remotelocation="minecraft.net" |
|
|
|
|
|
|
|
if [ "${installer}" == "1" ]; then |
|
|
|
if [ "${firstcommandname}" == "INSTALL" ]; then |
|
|
|
fn_update_minecraft_remotebuild |
|
|
|
fn_update_minecraft_dl |
|
|
|
else |
|
|
|