From 0a26d8a41a2d394c61dfa20558e4d13fe3178359 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 4 Apr 2019 19:38:40 +0100 Subject: [PATCH] fix(mcserver): fix syntax error with localbuild #2257 --- lgsm/functions/update_minecraft.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lgsm/functions/update_minecraft.sh b/lgsm/functions/update_minecraft.sh index 795d3fbfc..02b2b8c12 100644 --- a/lgsm/functions/update_minecraft.sh +++ b/lgsm/functions/update_minecraft.sh @@ -63,7 +63,7 @@ fn_update_minecraft_localbuild(){ fn_script_log_error "Set localbuild to 0" sleep 0.5 fi - + totalseconds=$((totalseconds + 1)) done fi @@ -74,15 +74,15 @@ fn_update_minecraft_localbuild(){ if [ -z "${localbuild}" ]; then # Gives time for var to generate. - end=$((SECONDS+120)) + end="$(SECONDS+120)" totalseconds=0 while [ "${SECONDS}" -lt "${end}" ]; do fn_print_info "Checking for update: ${remotelocation}: checking local build: waiting for local build: ${totalseconds}" if [ -z "${loopignore}" ]; then loopignore=1 fn_script_log_info "Waiting for local build to generate" - fi - localbuild=$(cat "${serverfiles}/logs/latest.log" 2> /dev/null | grep version | grep -Eo '((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}') grep -Eo "TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" | grep -Eo "((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}") + fi + localbuild=$(cat "${serverfiles}/logs/latest.log" 2> /dev/null | grep version | grep -Eo '((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}' | grep -Eo "TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" | grep -Eo "((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}") if [ "${localbuild}" ]; then break fi @@ -90,7 +90,7 @@ fn_update_minecraft_localbuild(){ totalseconds=$((totalseconds + 1)) done fi - + if [ -z "${localbuild}" ]; then localbuild="0" fn_print_error "Checking for update: ${remotelocation}: waiting for local build: missing local build info" @@ -126,7 +126,7 @@ fn_update_minecraft_remotebuild(){ fn_script_log_fatal "Unable to get remote build" core_exit.sh fi - fi + fi } fn_update_minecraft_compare(){