Skip to content

Commit

Permalink
Create workspace_entrypoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
KalanaRatnayake authored Aug 1, 2024
1 parent af25f61 commit 6d9aa69
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docker/workspace_entrypoint.sh
Original file line number Diff line number Diff line change
@@ -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 "$@"

0 comments on commit 6d9aa69

Please sign in to comment.