Substitute some unsafe chars for revision name

This ensures that the build system won't output something like
ringracers_rr/master.exe, among other potential issues.
This commit is contained in:
Eidolon 2024-05-14 19:32:05 -05:00
parent df28169031
commit 798d653c5b

View file

@ -174,7 +174,9 @@ if(NOT "${SRB2_GIT_DIR}" STREQUAL "" AND "${SRB2_SDL2_EXE_NAME}" STREQUAL "")
list(APPEND EXE_NAME_PARTS "ringracers")
if(NOT "${SRB2_GIT_REVISION}" STREQUAL "master")
list(APPEND EXE_NAME_PARTS ${SRB2_GIT_REVISION})
# substitute path-unsafe characters
string(REGEX REPLACE "[\\\/\^\$]" "_" SAFE_REVISION "${SRB2_GIT_REVISION}")
list(APPEND EXE_NAME_PARTS ${SAFE_REVISION})
endif()
if (SRB2_CONFIG_TESTERS)