Skip to content
This repository has been archived by the owner on Dec 21, 2024. It is now read-only.

correctly split up the PUGSETUP_DAMAGEPRINT_CVARS #37

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pug-practice/server_pug_practice.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,10 @@ set_damageprint_cvars() {
pugsetup_damageprint_cfg="${csgo_dir}/cfg/sourcemod/pugsetup/pugsetup_damageprint.cfg"

if [ -f "${pugsetup_damageprint_cfg}" ]; then
for cvar_value in $(echo $PUGSETUP_DAMAGEPRINT_CVARS | sed "s/,/ /g"); do
IFS=, read -ra cvar_values <<< "$PUGSETUP_DAMAGEPRINT_CVARS"
for cvar_value in "${cvar_values[@]}"; do
cvar=$(echo $cvar_value | cut -f1 -d=)
value=$(echo $cvar_value | cut -f2 -d=)
value=$(echo $cvar_value | cut -f2 -d= | sed "s,/,\\\/,g")

sed -i "s/${cvar} \"[^\]*\"/${cvar} \"${value}\"/g" $pugsetup_damageprint_cfg
done
Expand Down