Skip to content

Commit 78cb468

Browse files
authored
fix(update): resolve broken minecraft updater since v1.16.3 (#3067)
* fix(mcserver): resolve minecraft now outputting windows line endings * fix(update): resolve broken minecraft updater since v1.16.3
1 parent 6df8023 commit 78cb468

File tree

7 files changed

+10
-3
lines changed

7 files changed

+10
-3
lines changed

lgsm/functions/update_factorio.sh

100755100644
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ fn_update_factorio_compare(){
112112
command_start.sh
113113
fn_firstcommand_reset
114114
fi
115+
unset exitbypass
115116
date +%s > "${lockdir}/lastupdate.lock"
116117
alert="update"
117118
alert.sh

lgsm/functions/update_minecraft.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fn_update_minecraft_localbuild(){
3535
# Gets local build info.
3636
fn_print_dots "Checking local build: ${remotelocation}"
3737
# Uses log file to gather info.
38-
localbuild=$(grep Version "${consolelogdir}"/* 2>/dev/null | tail -1 | sed 's/.*Version //')
38+
localbuild=$(grep -i version "${consolelogdir}"/* | tail -1 | sed 's/.*[Vv]ersion //' | sed 's/\r//g' 2>/dev/null)
3939
if [ -z "${localbuild}" ]; then
4040
fn_print_error "Checking local build: ${remotelocation}"
4141
fn_print_error_nl "Checking local build: ${remotelocation}: no log files containing version info"
@@ -49,7 +49,7 @@ fn_update_minecraft_localbuild(){
4949
command_start.sh
5050
fn_firstcommand_reset
5151
totalseconds=0
52-
localbuild=$(grep Version "${consolelogdir}"/* 2>/dev/null | tail -1 | sed 's/.*Version //')
52+
localbuild=$(grep -i version "${consolelogdir}"/* | tail -1 | sed 's/.*[Vv]ersion //' | sed 's/\r//g' 2>/dev/null)
5353
while [ -z "${localbuild}" ]; do
5454
sleep 1
5555
fn_print_info "Checking local build: ${remotelocation}: waiting for log file: ${totalseconds}"
@@ -58,7 +58,7 @@ fn_update_minecraft_localbuild(){
5858
fn_script_log_info "Waiting for log file to generate"
5959
fi
6060

61-
localbuild=$(grep Version "$(ls -tr "${consolelogdir}"/* 2>/dev/null)" | tail -1 | sed 's/.*Version //')
61+
localbuild=$(grep -i version "${consolelogdir}"/* | tail -1 | sed 's/.*[Vv]ersion //' | sed 's/\r//g' 2>/dev/null)
6262
if [ "${totalseconds}" -gt "120" ]; then
6363
localbuild="0"
6464
fn_print_error "Checking local build: ${remotelocation}: waiting for log file"
@@ -145,6 +145,7 @@ fn_update_minecraft_compare(){
145145
command_start.sh
146146
fn_firstcommand_reset
147147
fi
148+
unset exitbypass
148149
date +%s > "${lockdir}/lastupdate.lock"
149150
alert="update"
150151
alert.sh

lgsm/functions/update_minecraft_bedrock.sh

100755100644
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ fn_update_minecraft_compare(){
139139
command_start.sh
140140
fn_firstcommand_reset
141141
fi
142+
unset exitbypass
142143
date +%s > "${lockdir}/lastupdate.lock"
143144
alert="update"
144145
alert.sh

lgsm/functions/update_mta.sh

100755100644
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ fn_update_mta_compare(){
168168
command_start.sh
169169
fn_firstcommand_reset
170170
fi
171+
unset exitbypass
171172
date +%s > "${lockdir}/lastupdate.lock"
172173
alert="update"
173174
alert.sh

lgsm/functions/update_mumble.sh

100755100644
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ fn_update_mumble_compare(){
104104
command_start.sh
105105
fn_firstcommand_reset
106106
fi
107+
unset exitbypass
107108
date +%s > "${lockdir}/lastupdate.lock"
108109
alert="update"
109110
alert.sh

lgsm/functions/update_steamcmd.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ fn_update_steamcmd_compare(){
113113
command_start.sh
114114
fn_firstcommand_reset
115115
fi
116+
unset exitbypass
116117
date +%s > "${lockdir}/lastupdate.lock"
117118
alert="update"
118119
alert.sh

lgsm/functions/update_ts3.sh

100755100644
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ fn_update_ts3_compare(){
166166
command_start.sh
167167
fn_firstcommand_reset
168168
fi
169+
unset exitbypass
169170
date +%s > "${lockdir}/lastupdate.lock"
170171
alert="update"
171172
alert.sh

0 commit comments

Comments
 (0)