fix(gmod): check cfg not my local test file

This commit is contained in:
jusito 2024-06-29 15:48:55 +02:00 committed by GitHub
parent 236a1fbbb9
commit 2105a54147
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,7 +20,7 @@ function configReplace() {
sed -E -i "/^\s${source}\s.*/d" "${CFG_PATH}" sed -E -i "/^\s${source}\s.*/d" "${CFG_PATH}"
local file_ends_on_newline=$([ "$(tail -c1 f | wc -l)" -eq 1 ] && echo true || echo false) local file_ends_on_newline=$([ "$(tail -c1 "${CFG_PATH}" | wc -l)" -eq 1 ] && echo true || echo false)
if ! $file_ends_on_newline; then if ! $file_ends_on_newline; then
echo "" >> "${CFG_PATH}" echo "" >> "${CFG_PATH}"
fi fi