setup.zsh 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. # generated from colcon_zsh/shell/template/prefix_chain.zsh.em
  2. # This script extends the environment with the environment of other prefix
  3. # paths which were sourced when this file was generated as well as all packages
  4. # contained in this prefix path.
  5. # function to source another script with conditional trace output
  6. # first argument: the path of the script
  7. _colcon_prefix_chain_zsh_source_script() {
  8. if [ -f "$1" ]; then
  9. if [ -n "$COLCON_TRACE" ]; then
  10. echo "# . \"$1\""
  11. fi
  12. . "$1"
  13. else
  14. echo "not found: \"$1\"" 1>&2
  15. fi
  16. }
  17. # source chained prefixes
  18. # setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced script
  19. COLCON_CURRENT_PREFIX="/opt/ros/humble"
  20. _colcon_prefix_chain_zsh_source_script "$COLCON_CURRENT_PREFIX/local_setup.zsh"
  21. # source this prefix
  22. # setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced script
  23. COLCON_CURRENT_PREFIX="$(builtin cd -q "`dirname "${(%):-%N}"`" > /dev/null && pwd)"
  24. _colcon_prefix_chain_zsh_source_script "$COLCON_CURRENT_PREFIX/local_setup.zsh"
  25. unset COLCON_CURRENT_PREFIX
  26. unset _colcon_prefix_chain_zsh_source_script