Skip to content

Commit 6e4480c

Browse files
committed
fix: address review feedback
- core_dl.sh: use array assignment for steamcmdcommand instead of read -r -a to avoid word-splitting on paths - fix_st.sh: correct module header typo (fix_ts.sh -> fix_st.sh) - command_skeleton.sh: fix grammar 'Creates an copy' -> 'Creates a copy' - serverlist-validate-game-icons.sh: anchor grep to start-of-line and require trailing comma to prevent false positives (e.g. 'tf' matching 'tf2' entries) - cs2server/_default.cfg: remove duplicate ntfy alert settings block
1 parent ec63aae commit 6e4480c

5 files changed

Lines changed: 6 additions & 16 deletions

File tree

.github/workflows/serverlist-validate-game-icons.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ shopt -s nullglob
2222
for gameiconpath in gameicons/*; do
2323
gameicon="$(basename "${gameiconpath}")"
2424
# check if $gameicon is in serverlist.csv
25-
if ! grep -q -F "${gameicon%-icon.png}" serverlist.csv; then
25+
if ! grep -q -E "^${gameicon%-icon.png}," serverlist.csv; then
2626
echo "ERROR: gameicon ${gameicon} is not in serverlist.csv"
2727
exitcode=1
2828
else

lgsm/config-default/config-lgsm/cs2server/_default.cfg

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,6 @@ ntfypassword=""
7272
ntfypriority=""
7373
ntfytags=""
7474

75-
# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy
76-
ntfyalert="off"
77-
ntfytopic="LinuxGSM"
78-
ntfyserver="https://ntfy.sh"
79-
ntfytoken=""
80-
ntfyusername=""
81-
ntfypassword=""
82-
ntfypriority=""
83-
ntfytags=""
84-
8575
# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet
8676
pushbulletalert="off"
8777
pushbullettoken="accesstoken"

lgsm/modules/command_skeleton.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Author: Daniel Gibbs
44
# Contributors: https://linuxgsm.com/contrib
55
# Website: https://linuxgsm.com
6-
# Description: Creates an copy of a game servers directories.
6+
# Description: Creates a copy of a game server directories.
77

88
commandname="SKELETON"
99
commandaction="Skeleton"

lgsm/modules/core_dl.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ fn_dl_steamcmd() {
4646
validate="validate"
4747
fi
4848

49-
# steamcmdcommand can contain multiple arguments; treat it as an argv array.
50-
steamcmdcommandarray=()
51-
read -r -a steamcmdcommandarray <<< "${steamcmdcommand}"
49+
# Wrap steamcmdcommand as a single-element array to avoid word-splitting
50+
# on paths/commands that should not be tokenised.
51+
steamcmdcommandarray=("${steamcmdcommand}")
5252
unbuffercommand=()
5353
if [ -n "${unbuffer}" ]; then
5454
unbuffercommand=("${unbuffer}")

lgsm/modules/fix_st.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# LinuxGSM fix_ts.sh module
2+
# LinuxGSM fix_st.sh module
33
# Author: Daniel Gibbs
44
# Contributors: https://linuxgsm.com/contrib
55
# Website: https://linuxgsm.com

0 commit comments

Comments
 (0)