Fix sed cmd not working with MSBuild
Fixes the `'\1' is not recognized as an internal or external command` error when trying to run the target `update-pot` with MSBuild. The `|` characters probably messed with cmd.exe or PowerShell syntax rules so they were replaced with slashes `/`. Also, at least some implementations of sed for Windows would produce CRLF line endings instead of LF line endings. The issue is fixed by adding the flag `-b`.1164-fix
parent
1c8c01ad96
commit
963cd1b347
|
@ -12,7 +12,7 @@ add_custom_command(OUTPUT ${_potFile}
|
|||
COMMAND ${XGETTEXT_CMD} ${colobot_SOURCE_DIR}/src/app/app.cpp --output=${_potFile} --no-wrap
|
||||
COMMAND ${XGETTEXT_CMD} ${colobot_SOURCE_DIR}/src/common/restext.cpp --output=${_potFile} --no-wrap --join-existing --no-location --keyword=TR
|
||||
COMMAND ${XGETTEXT_CMD} ${colobot_SOURCE_DIR}/src/script/script.cpp --output=${_potFile} --no-wrap --join-existing --no-location
|
||||
COMMAND sed -i -e "s|^\\(\"POT-Creation-Date:\\).*$|\\1 DATE\\\\n\"|" ${_potFile}
|
||||
COMMAND sed -bi -e "s/^\\(\"POT-Creation-Date:\\).*$/\\1 DATE\\\\n\"/" ${_potFile}
|
||||
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMENT "Extract translatable messages to ${_potFile}"
|
||||
|
|
Loading…
Reference in New Issue