Skip to content

Commit

Permalink
CMake: correct non-POSIX friendly 'sed-i' arg in FindPySide2Tools.cmake
Browse files Browse the repository at this point in the history
resolves #4588  
ticket: https://tracker.freecadweb.org/view.php?id=4588  
Patch provided by 'garya'  
Tweaked comment to reflect the patch change. [skip ci]
  • Loading branch information
luzpaz committed Mar 7, 2021
1 parent a48c7e2 commit 3d16f90
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cMake/FindPySide2Tools.cmake
Expand Up @@ -55,10 +55,10 @@ MACRO(PYSIDE_WRAP_UI outfiles)
else()
# Especially on Open Build Service we don't want changing date like
# pyside2-uic generates in comments at beginning., which is why
# we follow the tool command with in-place sed.
# we follow the tool command with a POSIX-friendly sed.
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND "${PYSIDE2UICBINARY}" ${UICOPTIONS} "${infile}" -o "${outfile}"
COMMAND sed -i "/^# /d" "${outfile}"
COMMAND sed "/^# /d" "${outfile}" >"${outfile}.tmp" && mv "${outfile}.tmp" "${outfile}"
MAIN_DEPENDENCY "${infile}"
)
endif()
Expand All @@ -85,7 +85,7 @@ MACRO(PYSIDE_WRAP_RC outfiles)
# we follow the tool command with in-place sed.
ADD_CUSTOM_COMMAND(OUTPUT "${outfile}"
COMMAND "${PYSIDE2RCCBINARY}" ${RCCOPTIONS} "${infile}" ${PY_ATTRIBUTE} -o "${outfile}"
COMMAND sed -i "/^# /d" "${outfile}"
COMMAND sed "/^# /d" "${outfile}" >"${outfile}.tmp" && mv "${outfile}.tmp" "${outfile}"
MAIN_DEPENDENCY "${infile}"
)
endif()
Expand Down

0 comments on commit 3d16f90

Please sign in to comment.