Merge pull request #122 from mikepurvis/allow-ros-distro-override
Allow expected ROS_DISTRO value to be overridden at compile time.
This commit is contained in:
commit
4ea42a76d0
|
@ -3,10 +3,17 @@
|
|||
# scrub old ROS bin dirs, to avoid accidentally finding the wrong executables
|
||||
export PATH="`@(PYTHON_EXECUTABLE) -c \"import os; print(os.pathsep.join([x for x in \\\"$PATH\\\".split(os.pathsep) if not any([d for d in ['cturtle', 'diamondback', 'electric', 'fuerte'] if d in x])]))\"`"
|
||||
|
||||
if [ -n "$ROS_DISTRO" -a "$ROS_DISTRO" != "kinetic" ]; then
|
||||
@{
|
||||
# This is a build-time environment variable which allows a build engineer to override the expected
|
||||
# ROS_DISTRO value for a workspace, for example to deliberately use a newer version of roslib with
|
||||
# an older release or vice-versa, or to define a custom distro (eg, "ROS Banana").
|
||||
from os import environ
|
||||
ROS_DISTRO = environ.get("ROS_DISTRO_OVERRIDE", "kinetic")
|
||||
}@
|
||||
if [ -n "$ROS_DISTRO" -a "$ROS_DISTRO" != "@(ROS_DISTRO)" ]; then
|
||||
echo "ROS_DISTRO was set to '$ROS_DISTRO' before. Please make sure that the environment does not mix paths from different distributions."
|
||||
fi
|
||||
export ROS_DISTRO=kinetic
|
||||
export ROS_DISTRO=@(ROS_DISTRO)
|
||||
|
||||
# python function to generate ROS package path based on all workspaces
|
||||
PYTHON_CODE_BUILD_ROS_PACKAGE_PATH=$(cat <<EOF
|
||||
|
|
Loading…
Reference in New Issue