-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Hello
This is not an issue, but it could be an imporvement. I setup ros_team_workspace with autosourcing a while ago, but I commented out the following lines from my ~/.bashrc when I stopped using it:
if [ -f ~/.ros_team_ws_rc ]; then
. ~/.ros_team_ws_rc
fi
When I wanted to use it again by running the command setup-auto-sourcing, I expected it to add the lines again or remove # but it didn't modify my ~/.bashrc at all. This is probably because of this condition in setup_auto_sourcing.bash:
if ! ( grep -q '\..*\.ros_team_ws_rc' $bashrc_location || grep -q 'source.*\.ros_team_ws_rc' $bashrc_location ); then
echo "" >> $bashrc_location
echo "# automatically source RosTeamWorkspace if the .ros_team_ws file is present in your home folder." >> $bashrc_location
echo "if [ -f ~/.ros_team_ws_rc ]; then" >> $bashrc_location
echo " . ~/.ros_team_ws_rc" >> $bashrc_location
echo "fi" >> $bashrc_location
fi
This checks that . ~/.ros_team_ws_rc exists without checking if it was commented out (if there's a # at the start of the line.
Steps to reproduce:
- Clone repo (master) & run
source setup.bash - run
setup-auto-sourcing - Go to ~/.bashrc & comment out the lines:
if [ -f ~/.ros_team_ws_rc ]; then
. ~/.ros_team_ws_rc
fi
- run
setup-auto-sourcingagain. - You'll notice that the setup.bash isn't sourced because the lines in ~/.bashrc aren't included back in.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels