diff --git a/qtcreator/setup b/qtcreator/setup index e3d3608b7..abb592525 100644 --- a/qtcreator/setup +++ b/qtcreator/setup @@ -9,8 +9,12 @@ function qtcreator if [[ ! -v TUE_ENV_ROS_VERSION && -v TUE_ROS_VERSION ]] then TUE_ENV_ROS_VERSION=${TUE_ROS_VERSION} - >&2 echo "Change the config of your environment to use 'TUE_ENV_ROS_VERSION' instead of 'TUE_ROS_VERSION'" + >&2 echo -e "\e[33;1m[qtcreator] Change the config of your environment to use 'TUE_ENV_ROS_DISTRO' instead of 'TUE_ROS_DISTRO'.\e[0m" fi + +# TODO(anyone): remove when tue-env is updated to new variable names +[[ -v TUE_ENV_WS_DIR || ! -v TUE_WS_DIR ]] || TUE_ENV_WS_DIR=${TUE_WS_DIR} + if [[ "${TUE_ENV_ROS_VERSION}" -eq 1 ]] then # Make sure packages can be build by QT diff --git a/ros-swri_console/setup b/ros-swri_console/setup index f6d49d44f..8de799fed 100644 --- a/ros-swri_console/setup +++ b/ros-swri_console/setup @@ -4,7 +4,7 @@ if [[ ! -v TUE_ENV_ROS_VERSION && -v TUE_ROS_VERSION ]] then TUE_ENV_ROS_VERSION=${TUE_ROS_VERSION} - >&2 echo "Change the config of your environment to use 'TUE_ENV_ROS_VERSION' instead of 'TUE_ROS_VERSION'" + >&2 echo -e "\e[33;1m[ros-swri_console] Change the config of your environment to use 'TUE_ENV_ROS_DISTRO' instead of 'TUE_ROS_DISTRO'.\e[0m" fi if [[ "${TUE_ENV_ROS_VERSION}" -eq 1 ]] then diff --git a/ros1/setup b/ros1/setup index 541744d59..d757c6b72 100644 --- a/ros1/setup +++ b/ros1/setup @@ -4,11 +4,11 @@ if [[ ! -v TUE_ENV_ROS_DISTRO && -v TUE_ROS_DISTRO ]] then TUE_ENV_ROS_DISTRO=${TUE_ROS_DISTRO} - >&2 echo "Change the config of your environment to use 'TUE_ENV_ROS_DISTRO' instead of 'TUE_ROS_DISTRO'" + >&2 echo -e "\e[33;1m[ros1] Change the config of your environment to use 'TUE_ENV_ROS_DISTRO' instead of 'TUE_ROS_DISTRO'.\e[0m" fi if [[ -z "${TUE_ENV_ROS_DISTRO}" ]] then - echo -e "\e[31;1m[ros] TUE_ENV_ROS_DISTRO was not set\e[0m" + >&2 echo -e "\e[31;1m[ros] TUE_ENV_ROS_DISTRO was not set.\e[0m" return 1 fi @@ -20,7 +20,7 @@ then # shellcheck disable=SC1091 source "${TUE_ENV_WS_DIR}"/devel/setup.bash else - echo -e "\e[33;1m[ros] system workspaces not found, sourcing /opt/ros\e[0m" + >&2 echo -e "\e[33;1m[ros] system workspaces not found, sourcing /opt/ros\e[0m" # shellcheck disable=SC1090 source /opt/ros/"${TUE_ENV_ROS_DISTRO}"/setup.bash fi diff --git a/ros2/setup b/ros2/setup index aaf726e66..9e7cb6d30 100644 --- a/ros2/setup +++ b/ros2/setup @@ -4,11 +4,11 @@ if [[ ! -v TUE_ENV_ROS_DISTRO && -v TUE_ROS_DISTRO ]] then TUE_ENV_ROS_DISTRO=${TUE_ROS_DISTRO} - >&2 echo "Change the config of your environment to use 'TUE_ENV_ROS_DISTRO' instead of 'TUE_ROS_DISTRO'" + >&2 echo -e "\e[33;1m[ros2] Change the config of your environment to use 'TUE_ENV_ROS_DISTRO' instead of 'TUE_ROS_DISTRO'.\e[0m" fi if [[ -z "${TUE_ENV_ROS_DISTRO}" ]] then - echo "[ros2] TUE_ENV_ROS_DISTRO was not set" + >&2 echo -e "\e[31;1m[ros2] TUE_ENV_ROS_DISTRO was not set.\e[0m" return 1 fi @@ -18,7 +18,7 @@ then # shellcheck disable=SC1090 source "/opt/ros/${TUE_ENV_ROS_DISTRO}/setup.bash" else - echo -e "\033[33;1m[ros2] ROS 2 ${TUE_ENV_ROS_DISTRO} setup.bash not found. \033[0m" + >&2 echo -e "\e[33;1m[ros2] ROS 2 ${TUE_ENV_ROS_DISTRO} setup.bash not found.\e[0m" fi # TODO(anyone): remove when tue-env is updated to new variable names @@ -29,7 +29,7 @@ then # shellcheck disable=SC1091 source "${TUE_ENV_WS_DIR}/install/local_setup.bash" else - echo -e "\033[33;1m[ros2] ${TUE_ENV_WS_DIR}/install/local_setup.bash not found. \033[0m" + >&2 echo -e "\e[33;1m[ros2] ${TUE_ENV_WS_DIR}/install/local_setup.bash not found.\e[0m" fi # Add Colcon sourcing to the shell startup script @@ -40,7 +40,7 @@ then # shellcheck disable=SC2016 export _colcon_cd_root="${TUE_ENV_WS_DIR}" else - echo -e "\033[33;5;1m[ros2] colcon_cd setup not found. colcon_cd command disabled. \033[0m" + >&2 echo -e "\e[33;1m[ros2] colcon_cd setup not found. colcon_cd command disabled.\e[0m" fi # shellcheck disable=SC2016