From 00b41ab8dea0071c214cb442838307343c36865f Mon Sep 17 00:00:00 2001 From: Woen-Sug Choi Date: Sun, 16 Jun 2024 09:00:22 +0900 Subject: [PATCH] polish --- install.sh | 7 ++++++- setenv.sh | 12 ++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index 000e083..cb37bc1 100755 --- a/install.sh +++ b/install.sh @@ -447,11 +447,16 @@ sed -i '' "s|VIRTUAL_ENV_ROOT|$VIRTUAL_ENV_ROOT|g" setenv.sh # Rename sentenv.sh to activate_ros if [ -f activate_ros ]; then rm activate_ros - mv setenv.sh activate_ros fi +mv setenv.sh activate_ros + +# Activate it +# shellcheck disable=SC1090 +. "$HOME/$ROS_INSTALL_ROOT"/activate_ros # Print post messages echo -e "\033[32m\nDone.🍎 (Apple Silicon) + 🤖 = 🚀❤️🤩🎉🥳 \033[0m" +echo -e "\033[32m\nTry 'ros2' or 'rviz' in the terminal to start ROS2 Jazzy. \033[0m" echo echo "To activate the new ROS2 distribution run the following command:" echo -e "\033[32m. $HOME/$ROS_INSTALL_ROOT/activate_ros\033[0m" diff --git a/setenv.sh b/setenv.sh index 639cb8f..7b4cb0c 100644 --- a/setenv.sh +++ b/setenv.sh @@ -26,16 +26,16 @@ function deactivate_ros() { } # Source Virtual Environment - # shellcheck disable=SC1090 -source "$HOME/$VIRTUAL_ENV_ROOT/bin/activate" +# shellcheck disable=SC1091 +source "$HOME/VIRTUAL_ENV_ROOT/bin/activate" # Source ROS if [[ $SHELL == *"bash"* ]]; then - # shellcheck disable=SC1090 - source "$HOME/$ROS_INSTALL_ROOT/install/setup.bash" + # shellcheck disable=SC1091 + source "$HOME/ROS_INSTALL_ROOT/install/setup.bash" elif [[ $SHELL == *"zsh"* ]]; then - # shellcheck disable=SC1090 - source "$HOME/$ROS_INSTALL_ROOT/install/setup.zsh" + # shellcheck disable=SC1091 + source "$HOME/ROS_INSTALL_ROOT/install/setup.zsh" else echo "Unsupported shell. Please use bash or zsh." exit 1