Browse Source

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
pull/4900/head
Daniel Gibbs 2 months ago
parent
commit
d04d5b6dfd
Failed to extract signature
  1. 2
      .github/workflows/serverlist-validate-game-icons.sh
  2. 10
      lgsm/config-default/config-lgsm/cs2server/_default.cfg
  3. 2
      lgsm/modules/command_skeleton.sh
  4. 6
      lgsm/modules/core_dl.sh
  5. 2
      lgsm/modules/fix_st.sh

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

@ -22,7 +22,7 @@ shopt -s nullglob
for gameiconpath in gameicons/*; do
gameicon="$(basename "${gameiconpath}")"
# check if $gameicon is in serverlist.csv
if ! grep -q -F "${gameicon%-icon.png}" serverlist.csv; then
if ! grep -q -E "^${gameicon%-icon.png}," serverlist.csv; then
echo "ERROR: gameicon ${gameicon} is not in serverlist.csv"
exitcode=1
else

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

@ -72,16 +72,6 @@ ntfypassword=""
ntfypriority=""
ntfytags=""
# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy
ntfyalert="off"
ntfytopic="LinuxGSM"
ntfyserver="https://ntfy.sh"
ntfytoken=""
ntfyusername=""
ntfypassword=""
ntfypriority=""
ntfytags=""
# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet
pushbulletalert="off"
pushbullettoken="accesstoken"

2
lgsm/modules/command_skeleton.sh

@ -3,7 +3,7 @@
# Author: Daniel Gibbs
# Contributors: https://linuxgsm.com/contrib
# Website: https://linuxgsm.com
# Description: Creates an copy of a game servers directories.
# Description: Creates a copy of a game server directories.
commandname="SKELETON"
commandaction="Skeleton"

6
lgsm/modules/core_dl.sh

@ -46,9 +46,9 @@ fn_dl_steamcmd() {
validate="validate"
fi
# steamcmdcommand can contain multiple arguments; treat it as an argv array.
steamcmdcommandarray=()
read -r -a steamcmdcommandarray <<< "${steamcmdcommand}"
# Wrap steamcmdcommand as a single-element array to avoid word-splitting
# on paths/commands that should not be tokenised.
steamcmdcommandarray=("${steamcmdcommand}")
unbuffercommand=()
if [ -n "${unbuffer}" ]; then
unbuffercommand=("${unbuffer}")

2
lgsm/modules/fix_st.sh

@ -1,5 +1,5 @@
#!/bin/bash
# LinuxGSM fix_ts.sh module
# LinuxGSM fix_st.sh module
# Author: Daniel Gibbs
# Contributors: https://linuxgsm.com/contrib
# Website: https://linuxgsm.com

Loading…
Cancel
Save