diff --git a/docker/workspace_entrypoint.sh b/docker/workspace_entrypoint.sh new file mode 100644 index 0000000..f0bc50d --- /dev/null +++ b/docker/workspace_entrypoint.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -e + +if [ -f "/opt/ros/$ROS_DISTRO/setup.bash" ]; then + echo "sourcing /opt/ros/$ROS_DISTRO/setup.bash" + source /opt/ros/$ROS_DISTRO/setup.bash +else + echo "notfound /opt/ros/$ROS_DISTRO/setup.bash" + + echo "sourcing /opt/ros/$ROS_DISTRO/install/setup.bash" + source /opt/ros/$ROS_DISTRO/install/setup.bash +fi + +echo "sourcing $WORKSPACE_ROOT/install/setup.bash" +source "$WORKSPACE_ROOT/install/setup.bash" + +exec "$@"