Skip to content

Commit

Permalink
Add: newline before cmake append in configure.sh. configure.sh does n…
Browse files Browse the repository at this point in the history
…ot correctly append if ./bashrc does not end in a newline as-is. (#351)
  • Loading branch information
albee authored Dec 1, 2021
1 parent 784f0cb commit 4450e5c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,10 @@ if [ $native_build == 1 ] ; then
# Add our cmake to paths and bashrc
grep -qF 'source /opt/ros/'$ros_version'/setup.bash' ~/.bashrc || echo 'source /opt/ros/'$ros_version'/setup.bash' >> ~/.bashrc
cmake_astrobee_path=`catkin locate -s`/cmake
grep -qF ${cmake_astrobee_path} ~/.bashrc \
|| echo 'if [[ ":$CMAKE_PREFIX_PATH:" != *":'${cmake_astrobee_path}':"* ]]; then CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+"$CMAKE_PREFIX_PATH:"}'${cmake_astrobee_path}'"; fi' >> ~/.bashrc
grep -qF ${cmake_astrobee_path} ~/.bashrc || {
echo -e '\n' >> ~/.bashrc \
echo 'if [[ ":$CMAKE_PREFIX_PATH:" != *":'${cmake_astrobee_path}':"* ]]; then CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:+"$CMAKE_PREFIX_PATH:"}'${cmake_astrobee_path}'"; fi' >> ~/.bashrc
}
source ~/.bashrc

catkin profile add native
Expand Down

0 comments on commit 4450e5c

Please sign in to comment.