Closed traversaro closed 2 years ago
The changes are unfortunatly far from being intuitive/mantainable, and this is the reason why for multiplatform multiprogram logic we use either yarpmanager of Python scripts that use the subprocess library ( https://docs.python.org/3/library/subprocess.html ).
You are right, if we want to invest time in multiplatform support we should replace the bash scripts. I can open an issue for tracking this activity @vvasco @vtikha In the meanwhile your changes @traversaro are fine! Merging
Just for a reference on the strange escaping rule in Git Bash:
STraversaro@IITICUBLAP257 MINGW64 ~
$ TEST_VAR=/test cmd.exe /C "echo %TEST_VAR%"
C:/Program Files/Git/test
STraversaro@IITICUBLAP257 MINGW64 ~
$ TEST_VAR=/test/test2 cmd.exe /C "echo %TEST_VAR%"
C:/Program Files/Git/test/test2
STraversaro@IITICUBLAP257 MINGW64 ~
$ TEST_VAR=/test/test2:o cmd.exe /C "echo %TEST_VAR%"
/test/test2:o
STraversaro@IITICUBLAP257 MINGW64 ~
$ TEST_VAR=//test cmd.exe /C "echo %TEST_VAR%"
/test
STraversaro@IITICUBLAP257 MINGW64 ~
$ TEST_VAR=//test/test2 cmd.exe /C "echo %TEST_VAR%"
//test/test2
STraversaro@IITICUBLAP257 MINGW64 ~
$ TEST_VAR=//test cmd.exe /C "echo %TEST_VAR%"
This permit to run the
hold_box.script.sh
experiment on Windows, as discussed in https://github.com/icub-tech-iit/ergocub-gazebo-simulations/issues/29#issuecomment-1067084821 .The changes are the following:
killall
, sotaskill
is used instead./
are implicitly interpreted as path and convert to a path, see https://github.com/bmatzelle/gow/issues/196 . To avoid problem related to this, we:YARP_CLOCK
to//clock
on Windowsyarp rpc
calls, we specify the argument prefixed with a space, to avoid any problem (this strategy does not work when defining theYARP_CLOCK
The changes are unfortunatly far from being intuitive/mantainable, and this is the reason why for multiplatform multiprogram logic we use either yarpmanager of Python scripts that use the
subprocess
library ( https://docs.python.org/3/library/subprocess.html ).