setup.sh 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # generated from colcon_core/shell/template/prefix_chain.sh.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. # since a plain shell script can't determine its own path when being sourced
  6. # either use the provided COLCON_CURRENT_PREFIX
  7. # or fall back to the build time prefix (if it exists)
  8. _colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX=/home/wub/work/1_nzzn/2_code/13_LG/install
  9. if [ ! -z "$COLCON_CURRENT_PREFIX" ]; then
  10. _colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX"
  11. elif [ ! -d "$_colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX" ]; then
  12. echo "The build time path \"$_colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX\" doesn't exist. Either source a script for a different shell or set the environment variable \"COLCON_CURRENT_PREFIX\" explicitly." 1>&2
  13. unset _colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX
  14. return 1
  15. fi
  16. # function to source another script with conditional trace output
  17. # first argument: the path of the script
  18. _colcon_prefix_chain_sh_source_script() {
  19. if [ -f "$1" ]; then
  20. if [ -n "$COLCON_TRACE" ]; then
  21. echo "# . \"$1\""
  22. fi
  23. . "$1"
  24. else
  25. echo "not found: \"$1\"" 1>&2
  26. fi
  27. }
  28. # source chained prefixes
  29. # setting COLCON_CURRENT_PREFIX avoids relying on the build time prefix of the sourced script
  30. COLCON_CURRENT_PREFIX="/opt/ros/humble"
  31. _colcon_prefix_chain_sh_source_script "$COLCON_CURRENT_PREFIX/local_setup.sh"
  32. # source this prefix
  33. # setting COLCON_CURRENT_PREFIX avoids relying on the build time prefix of the sourced script
  34. COLCON_CURRENT_PREFIX="$_colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX"
  35. _colcon_prefix_chain_sh_source_script "$COLCON_CURRENT_PREFIX/local_setup.sh"
  36. unset _colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX
  37. unset _colcon_prefix_chain_sh_source_script
  38. unset COLCON_CURRENT_PREFIX