From 3b49592e9149a0aed99b9ac14da54378d2b9bb3d Mon Sep 17 00:00:00 2001 From: Digital-Storm Date: Tue, 2 May 2017 17:05:05 -0400 Subject: [PATCH] currentbuild return only 1 line Current experimental loads multiple base version files, modified to tail -1 and return only 1 line, so updater checks version properly. --- lgsm/functions/update_factorio.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/update_factorio.sh b/lgsm/functions/update_factorio.sh index cbb39ef18..934a30dbb 100644 --- a/lgsm/functions/update_factorio.sh +++ b/lgsm/functions/update_factorio.sh @@ -49,7 +49,7 @@ fn_update_factorio_currentbuild(){ fi # Get current build from logs - currentbuild=$(grep "Loading mod base" "${consolelogdir}"/"${servicename}"-console.log 2> /dev/null|awk '{print $5}') + currentbuild=$(grep "Loading mod base" "${consolelogdir}"/"${servicename}"-console.log 2> /dev/null|awk '{print $5}'|tail -1) if [ -z "${currentbuild}" ]; then fn_print_error_nl "Checking for update: factorio.com: Current build version not found" fn_script_log_error "Checking for update: factorio.com: Current build version not found" @@ -60,7 +60,7 @@ fn_update_factorio_currentbuild(){ command_stop.sh exitbypass=1 command_start.sh - currentbuild=$(grep "Loading mod base" "${consolelogdir}"/"${servicename}"-console.log 2> /dev/null|awk '{print $5}') + currentbuild=$(grep "Loading mod base" "${consolelogdir}"/"${servicename}"-console.log 2> /dev/null|awk '{print $5}'|tail -1) if [ -z "${currentbuild}" ]; then fn_print_fail_nl "Checking for update: factorio.com: Current build version still not found" fn_script_log_fatal "Checking for update: factorio.com: Current build version still not found"