Skip to content

Commit

Permalink
Fix docker error (StoglRobotics#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
mamueluth authored Aug 24, 2022
1 parent efbb23f commit 9bb331f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/setup-ros-workspace.bash
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Load Framework defines
setup_ws_script_own_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" > /dev/null && pwd )"
source $setup_ws_script_own_dir/../setup.bash
source $setup_ws_script_own_dir/docker/_RosTeamWs_Docker_Defines.bash

check_user_input () {
# ros distribution name will be set in ${ros_distro}
Expand Down Expand Up @@ -169,7 +170,7 @@ setup_ros_team_ws_file() {
if [ -f "$ros_team_ws_file" ]; then
new_rtw_file_name="${ros_team_ws_file_name}.bkp-$(ls ${ros_team_ws_file}* | wc -l)"
echo ""
cp "$ros_team_ws_file" "$new_rtw_file_name"
cp "$ros_team_ws_file" "$HOME/$new_rtw_file_name"
notify_user "${ros_team_ws_file_name} already exists. Copied it to ${new_rtw_file_name}."
# Comment out the old configuration if such exists - this is hard if using functions...
sed -i -e '/'"$fun_name"'/ s/^#*/OLD_/' "$ros_team_ws_file"
Expand All @@ -189,10 +190,11 @@ setup_ros_team_ws_file() {
local docker_support="$use_docker"
if [ "$is_docker_rtw_file" = true ]; then
docker_support=false # don't use docker in docker
source_path_rtw=" source /opt/RosTeamWS/ros_ws_$chosen_ros_distro/src/ros_team_workspace/scripts/environment/setup.bash \"\$RosTeamWS_DISTRO\" \"\$RosTeamWS_WS_FOLDER\" \"\$RosTeamWS_WS_PREFIX\" \"\$RosTeamWS_WS_SUFFIX\""
else
source_path_rtw=" source $FRAMEWORK_BASE_PATH/scripts/environment/setup.bash \"\$RosTeamWS_DISTRO\" \"\$RosTeamWS_WS_FOLDER\" \"\$RosTeamWS_WS_PREFIX\" \"\$RosTeamWS_WS_SUFFIX\""
fi

source_path_rtw=" source $FRAMEWORK_BASE_PATH/scripts/environment/setup.bash \"\$RosTeamWS_DISTRO\" \"\$RosTeamWS_WS_FOLDER\" \"\$RosTeamWS_WS_PREFIX\" \"\$RosTeamWS_WS_SUFFIX\""

echo "" >> "$ros_team_ws_file"
echo "$fun_name () {" >> "$ros_team_ws_file"
echo " RosTeamWS_BASE_WS=\"${base_ws}\"" >> "$ros_team_ws_file"
Expand Down

0 comments on commit 9bb331f

Please sign in to comment.