From 9b62c8b0ef68121bac126140380dc8d20e202845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ellensohn?= Date: Thu, 7 Sep 2023 11:03:07 +0200 Subject: [PATCH] update --- docker/entrypoint.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index ead76e9..7546eeb 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -11,7 +11,7 @@ echo "Sourced ROS 2 ${ROS_DISTRO}" if [ -f ${UNDERLAY_WS}/install/setup.bash ] then source ${UNDERLAY_WS}/install/setup.bash - #export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:$(ros2 pkg prefix turtlebot3_gazebo)/share/turtlebot3_gazebo/models + vcs pull ${UNDERLAY_WS}/src echo "Sourced CPS RMP 220 base workspace" fi @@ -19,7 +19,7 @@ fi if [ -f /overlay_ws/install/setup.bash ] then source /overlay_ws/install/setup.bash - #export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:$(ros2 pkg prefix tb3_worlds)/share/tb3_worlds/models + vcs pull /overlay_ws/src echo "Sourced CPS RMP 220 Overlay workspace" fi @@ -31,5 +31,20 @@ then echo "Sourced CPS RMP 220 base workspace" fi +# Implement updating all repositories at launch +if [ -f ${UNDERLAY_WS}/] +then + cd ${UNDERLAY_WS} + vcs pull src + echo "Updated base workspace" +fi + +if [ -f /overlay_ws/] +then + cd /overlay_ws + vcs pull src + echo "Updated overlay workspace" +fi + # Execute the command passed into this entrypoint exec "$@" \ No newline at end of file