1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
# generated from colcon_bash/shell/template/prefix_chain.bash.em
# This script extends the environment with the environment of other prefix
# paths which were sourced when this file was generated as well as all packages
# contained in this prefix path.
# function to source another script with conditional trace output
# first argument: the path of the script
_colcon_prefix_chain_bash_source_script() {
if [ -f "$1" ]; then
if [ -n "$COLCON_TRACE" ]; then
echo "# . \"$1\""
fi
. "$1"
else
echo "not found: \"$1\"" 1>&2
fi
}
@[if chained_prefix_path]@
# source chained prefixes
@[ for prefix in reversed(chained_prefix_path)]@
# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced script
COLCON_CURRENT_PREFIX="@(prefix)"
_colcon_prefix_chain_bash_source_script "$COLCON_CURRENT_PREFIX/@(prefix_script_no_ext).bash"
@[ end for]@
@[end if]@
# source this prefix
# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced script
COLCON_CURRENT_PREFIX="$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" > /dev/null && pwd)"
_colcon_prefix_chain_bash_source_script "$COLCON_CURRENT_PREFIX/@(prefix_script_no_ext).bash"
unset COLCON_CURRENT_PREFIX
unset _colcon_prefix_chain_bash_source_script
|