From ece5df17d17a0be13081f66663bfe07fda44f4f3 Mon Sep 17 00:00:00 2001 From: Woen-Sug Choi Date: Mon, 17 Jun 2024 14:23:27 +0900 Subject: [PATCH] gazebo post fix --- gz_install.sh | 6 +++--- setenv_gz.sh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gz_install.sh b/gz_install.sh index 1048cab..26f97ce 100755 --- a/gz_install.sh +++ b/gz_install.sh @@ -267,10 +267,10 @@ sed -i '' "s|VIRTUAL_ENV_ROOT|$VIRTUAL_ENV_ROOT|g" setenv_gz.sh sed -i '' "s|GZ_INSTALL_ROOT|$GZ_INSTALL_ROOT|g" setenv_gz.sh # Rename sentenv.sh to activate_ros -if [ -f activate_ros ]; then - rm activate_ros +if [ -f "$HOME/$ROS_INSTALL_ROOT/activate_ros" ]; then + rm "$HOME/$ROS_INSTALL_ROOT/activate_ros" fi -mv setenv_gz.sh activate_ros +mv setenv_gz.sh "$HOME/$ROS_INSTALL_ROOT/activate_ros" # Print post messages printf '\033[32m%.0s=\033[0m' {1..75} && echo diff --git a/setenv_gz.sh b/setenv_gz.sh index 641d7f6..30ced48 100644 --- a/setenv_gz.sh +++ b/setenv_gz.sh @@ -9,12 +9,12 @@ if [[ $SHELL == *"bash"* ]]; then # shellcheck disable=SC1091 source "$HOME/ROS_INSTALL_ROOT/install/setup.bash" # shellcheck disable=SC1091 - source "$HOME/ROS_INSTALL_ROOT/GZ_INSTALL_ROOT/install/setup.bash" + source "$HOME/GZ_INSTALL_ROOT/install/setup.bash" elif [[ $SHELL == *"zsh"* ]]; then # shellcheck disable=SC1091 source "$HOME/ROS_INSTALL_ROOT/install/setup.zsh" # shellcheck disable=SC1091 - source "$HOME/ROS_INSTALL_ROOT/GZ_INSTALL_ROOT/install/setup.zsh" + source "$HOME/GZ_INSTALL_ROOT/install/setup.zsh" else echo "Unsupported shell. Please use bash or zsh." exit 1