Skip to content

Commit aed9530

Browse files
committed
change config file location
1 parent 3a5bf22 commit aed9530

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

gz_install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,8 @@ if [ -f "$HOME/.gz/sim/8/gui.config" ]; then
264264
fi
265265

266266
# save GZ_INSTALL_ROOT in a file
267-
if [ -f "$HOME/$ROS_INSTALL_ROOT/config" ]; then
268-
echo "GZ_INSTALL_ROOT=$GZ_INSTALL_ROOT" >> "$HOME/$ROS_INSTALL_ROOT/config"
267+
if [ -f "$HOME/.ros2_jazzy_install_config" ]; then
268+
echo "GZ_INSTALL_ROOT=$GZ_INSTALL_ROOT" >> "$HOME/.ros2_jazzy_install_config"
269269
fi
270270

271271
# Download sentenv.sh

install.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ VIRTUAL_ENV_ROOT=${VIRTUAL_ENV_ROOT:-$VIRTUAL_ENV_ROOT_DEFAULT}
8181
# If uninstall
8282
if [ -n "$UNINSTALL_FLAG" ]; then
8383
echo -e "\033[31mUninstall installation request found!\033[0m"
84-
if [ -f "$HOME/$ROS_INSTALL_ROOT/config" ]; then
85-
# shellcheck disable=SC1090
86-
source "$HOME/$ROS_INSTALL_ROOT/config"
84+
if [ -f "$HOME/.ros2_jazzy_install_config" ]; then
85+
# shellcheck disable=SC1091
86+
source "$HOME/.ros2_jazzy_install_config"
8787
echo "⚠️ The following directories will be removed:"
8888
[ -n "$ROS_INSTALL_ROOT" ] && [ -d "$HOME/$ROS_INSTALL_ROOT" ] && echo " - $HOME/$ROS_INSTALL_ROOT"
8989
[ -n "$VIRTUAL_ENV_ROOT" ] && [ -d "$HOME/$VIRTUAL_ENV_ROOT" ] && echo " - $HOME/$VIRTUAL_ENV_ROOT"
@@ -107,7 +107,7 @@ if [ -n "$UNINSTALL_FLAG" ]; then
107107
fi
108108
fi
109109
else
110-
echo -e "\033[31m❌ Error: Configuration file not found at $HOME/$ROS_INSTALL_ROOT/config\033[0m"
110+
echo -e "\033[31m❌ Error: Configuration file not found at $HOME/.ros2_jazzy_install_config\033[0m"
111111
echo -e "it seems that the installation is not found. Please check the installation directory.\n"
112112
exit 1
113113
fi
@@ -566,12 +566,12 @@ echo -e "\033[34m### [6/6] Post Installation Configuration\033[0m"
566566
printf '\033[34m%.0s=\033[0m' {1..75} && echo
567567
# ------------------------------------------------------------------------------
568568
# save JAZZY_RELEASE_TAG, VIRTUAL_ENV_ROOT, VIRTUAL_ENV_ROOT in a file
569-
if [ -f config ]; then
570-
rm config
569+
if [ -f "$HOME/.ros2_jazzy_install_config" ]; then
570+
rm "$HOME/.ros2_jazzy_install_config"
571571
fi
572-
echo "JAZZY_RELEASE_TAG=$JAZZY_RELEASE_TAG" > "$HOME/$ROS_INSTALL_ROOT/config"
573-
echo "VIRTUAL_ENV_ROOT=$VIRTUAL_ENV_ROOT" >> "$HOME/$ROS_INSTALL_ROOT/config"
574-
echo "ROS_INSTALL_ROOT=$ROS_INSTALL_ROOT" >> "$HOME/$ROS_INSTALL_ROOT/config"
572+
echo "JAZZY_RELEASE_TAG=$JAZZY_RELEASE_TAG" > "$HOME/.ros2_jazzy_install_config"
573+
echo "VIRTUAL_ENV_ROOT=$VIRTUAL_ENV_ROOT" >> "$HOME/.ros2_jazzy_install_config"
574+
echo "ROS_INSTALL_ROOT=$ROS_INSTALL_ROOT" >> "$HOME/.ros2_jazzy_install_config"
575575

576576
# Download sentenv.sh
577577
if [ -f setenv.sh ]; then

0 commit comments

Comments
 (0)