From 971bb6695bc16e77853e42cf67c175078f5b835f Mon Sep 17 00:00:00 2001 From: luz paz Date: Sun, 7 Mar 2021 05:52:27 -0500 Subject: [PATCH] CMake: correct non-POSIX friendly 'sed-i' arg in FindPySide2Tools.cmake resolves #0004588 ticket: https://tracker.freecadweb.org/view.php?id=4588 Patch provided by 'garya' Tweaked comment to reflect the patch change. [skip ci] --- cMake/FindPySide2Tools.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cMake/FindPySide2Tools.cmake b/cMake/FindPySide2Tools.cmake index 216da5f7a2..384a76f171 100644 --- a/cMake/FindPySide2Tools.cmake +++ b/cMake/FindPySide2Tools.cmake @@ -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() @@ -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()