From 4450e5c5227b491207b03bb9c8e338d36016094e Mon Sep 17 00:00:00 2001 From: Keenan Albee Date: Tue, 30 Nov 2021 18:23:16 -0800 Subject: [PATCH] Add: newline before cmake append in configure.sh. configure.sh does not correctly append if ./bashrc does not end in a newline as-is. (#351) --- scripts/configure.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/configure.sh b/scripts/configure.sh index 5d744afce2..7c648e1ac5 100755 --- a/scripts/configure.sh +++ b/scripts/configure.sh @@ -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