Skip to content

Commit ec16dcb

Browse files
committed
fix(xnt): version command not completing carriage return
1 parent 1c91b9b commit ec16dcb

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

lgsm/modules/update_xnt.sh

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/bin/bash
2-
# LinuxGSM command_ut99.sh module
2+
# LinuxGSM command_xnt.sh module
33
# Author: Daniel Gibbs
44
# Contributors: https://linuxgsm.com/contrib
55
# Website: https://linuxgsm.com
6-
# Description: Handles updating of Unreal Tournament 99 servers.
6+
# Description: Handles updating of Xontic servers.
77

88
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
99

@@ -17,10 +17,17 @@ fn_update_dl() {
1717
fn_update_localbuild() {
1818
# Gets local build info.
1919
fn_print_dots "Checking local build: ${remotelocation}"
20-
21-
# Send version command to Xonotic server.
22-
tmux -L "${socketname}" send-keys -t "${sessionname}" "version\r" > /dev/null 2>&1
23-
fn_sleep_time_1
20+
check_status.sh
21+
if [ "${status}" != "0" ]; then
22+
# Send version command to Xonotic server.
23+
tmux -L "${socketname}" send-keys -t "${sessionname}" "version" C-m > /dev/null 2>&1
24+
fn_sleep_time_1
25+
else
26+
command_start.sh
27+
tmux -L "${socketname}" send-keys -t "${sessionname}" "version" C-m > /dev/null 2>&1
28+
fn_sleep_time_1
29+
command_stop.sh
30+
fi
2431

2532
# Uses log file to get local build.
2633
localbuild=$(grep "SVQC version: xonotic-v" "${consolelogdir}"/* 2> /dev/null | tail -1 | sed 's/.*SVQC version: \(xonotic-v[0-9.]*\).*/\1/' | tr -d '\000-\011\013-\037')

0 commit comments

Comments
 (0)