Skip to content

Commit

Permalink
Try heredoc bash to python interp
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbovbel committed Aug 18, 2022
1 parent 70c8acc commit 17b8531
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion catkin_virtualenv/cmake/templates/program.devel.in
@@ -1,4 +1,6 @@
#!${${PROJECT_NAME}_VENV_DEVEL_DIR}/bin/python
#!/usr/bin/env bash

exec ${${PROJECT_NAME}_VENV_DEVEL_DIR}/bin/python <<EOF
import re
import sys
Expand All @@ -7,3 +9,4 @@ from setproctitle import setproctitle
program_path = "${program_path}"
setproctitle(' '.join([program_path] + sys.argv[1:]))
exec(open(program_path).read())
EOF
5 changes: 4 additions & 1 deletion catkin_virtualenv/cmake/templates/program.install.in
@@ -1,4 +1,6 @@
#!${${PROJECT_NAME}_VENV_INSTALL_DIR}/bin/python
#!/usr/bin/env bash

exec ${${PROJECT_NAME}_VENV_INSTALL_DIR}/bin/python <<EOF
import re
import sys
Expand All @@ -7,3 +9,4 @@ from setproctitle import setproctitle
program_path = "${CMAKE_INSTALL_PREFIX}/${program_install_location}/${program_basename}"
setproctitle(' '.join([program_path] + sys.argv[1:]))
exec(open(program_path).read())
EOF

0 comments on commit 17b8531

Please sign in to comment.