Skip to content

sed fails if cfg contains subdirectories - #216

Merged
joedwards32 merged 3 commits into
joedwards32:mainfrom
osg-lan:bugfix/sed-wildcard
Aug 31, 2026
Merged

joedwards32 merged 3 commits into
joedwards32:mainfrom
osg-lan:bugfix/sed-wildcard

Conversation

@ppaulis

@ppaulis ppaulis commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

@joedwards32 Currently, the sed commands target everything in the cfg-folder. But apparently, there can be sub-directories:

(steamrt sniper 3.0.20260805.254768)steam@2e12c3fbc53a:~/cs2-dedicated/game/csgo/cfg$ ls -al
total 160
drwxr-xr-x  3 steam steam  4096 Aug 30 20:51 .
drwxr-xr-x 10 steam steam 20480 Aug 30 20:45 ..
drwxr-xr-x  2 steam steam  4096 Aug 30 10:32 devonly     <======================== sub-directory
-rwxr-xr-x  1 steam steam  4262 Aug 30 20:51 gamemode_armsrace.cfg
-rwxr-xr-x  1 steam steam  4436 Aug 30 20:51 gamemode_casual.cfg
-rwxr-xr-x  1 steam steam  4367 Aug 30 20:51 gamemode_competitive.cfg
-rwxr-xr-x  1 steam steam  4271 Aug 30 20:51 gamemode_competitive2v2.cfg
-rwxr-xr-x  1 steam steam   132 Aug 30 20:51 gamemode_competitive2v2_offline.cfg
-rwxr-xr-x  1 steam steam   134 Aug 30 20:51 gamemode_competitive_offline.cfg
-rwxr-xr-x  1 steam steam   102 Aug 30 20:51 gamemode_competitive_short.cfg
-rwxr-xr-x  1 steam steam   766 Aug 30 20:51 gamemode_competitive_tmm.cfg
-rwxr-xr-x  1 steam steam  1978 Aug 30 20:51 gamemode_cooperative.cfg
-rwxr-xr-x  1 steam steam  3651 Aug 30 20:51 gamemode_coopmission.cfg
-rwxr-xr-x  1 steam steam    75 Aug 30 20:51 gamemode_custom.cfg
-rwxr-xr-x  1 steam steam  4446 Aug 30 20:51 gamemode_deathmatch.cfg
-rwxr-xr-x  1 steam steam   243 Aug 30 20:51 gamemode_deathmatch_short.cfg
-rwxr-xr-x  1 steam steam   789 Aug 30 20:51 gamemode_deathmatch_tmm.cfg
-rwxr-xr-x  1 steam steam  3772 Aug 30 20:51 gamemode_demolition.cfg
-rwxr-xr-x  1 steam steam  4067 Aug 30 20:51 gamemode_dm_freeforall.cfg
-rwxr-xr-x  1 steam steam   509 Aug 30 20:51 gamemode_new_user_training.cfg
-rwxr-xr-x  1 steam steam  4219 Aug 30 20:51 gamemode_retakecasual.cfg
-rwxr-xr-x  1 steam steam  3786 Aug 30 20:51 gamemode_teamdeathmatch.cfg
-rwxr-xr-x  1 steam steam  3818 Aug 30 20:51 gamemode_workshop.cfg
-rwxr-xr-x  1 steam steam   313 Aug 17 19:24 machine_convars_default.vcfg
-rwxr-xr-x  1 steam steam  3367 Aug 30 20:51 perftest.cfg
-rwxr-xr-x  1 steam steam  2856 Aug 30 20:51 server.cfg
-rwxr-xr-x  1 steam steam   370 Aug 30 20:51 server_default.cfg
-rwxr-xr-x  1 steam steam  1232 Aug 17 19:24 user_keys_default.vcfg
-rwxr-xr-x  1 steam steam  1447 Aug 17 19:24 user_keys_dev_default.vcfg

In this case, the sed-commands fail instantly and the CS2_BOT* env vars are not applied.
This fix makes the sed commands only target gamemode_*.cfg files.

Signed-off-by: Pascal Paulis <ppaulis@gmail.com>
Signed-off-by: Pascal Paulis <ppaulis@gmail.com>
if there's a single directory in the cfg folder, the sed commands fail. With this fix, sed only targets gamemode* files
@joedwards32

Copy link
Copy Markdown
Owner

Thanks for the fix. Merging.

@joedwards32
joedwards32 merged commit e0e1047 into joedwards32:main Aug 31, 2026
2 checks passed
@ppaulis
ppaulis deleted the bugfix/sed-wildcard branch August 31, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants