Salome HOME
ROOT : cleanup + add ROOT master product batch file
[tools/sat_salome.git] / products / compil_scripts / sip.bat
index 3a1866221317f27d266c2734f4fa6fc5c475f5f7..63d895ce3cf209d2148b1b7e3c0a81b7603ce86f 100755 (executable)
@@ -61,8 +61,7 @@ if NOT %ERRORLEVEL% == 0 (
 REM In debug mode, we need to rename all _d.pyd to .pyd... don't ask why. Seems like a known bug in OmniORB.
 if %SAT_DEBUG% == 1 (
   cd %PRODUCT_INSTALL%\lib\%python_name%\site-packages
-  powershell -Command "Get-ChildItem *_d.pyd| Rename-Item -newname { $_.name -replace '_d.pyd','.pyd' }"
-  powershell -Command "Get-ChildItem *.pyd| Rename-Item -newname { $_.name -replace '.pyd','_d.pyd' }"
+  powershell -Command "Get-ChildItem -File -Recurse *.pyd| ForEach-Object {if (($_.Name.EndsWith('_d.pyd'))) {  $_ | Copy-Item -Destination {$_.Name  -replace '_d.pyd','.pyd'}}}"
 )
 
 echo.