1
0
Fork 0
mirror of https://github.com/lopsided98/nix-ros-overlay.git synced 2025-07-14 14:10:37 +03:00
nix-ros-overlay/ament-cmake-core-setup-hook.sh
Ben Wolsieffer 40ccc530bb Initial ROS 2 support.
The basic packages build, but there is no guarantee that they work correctly.
2019-09-05 22:47:17 -04:00

16 lines
359 B
Bash

isAmentPackage() {
[ -d "$1/share/ament_index" ]
}
declare -gA _amentPackagesSeen
_findAmentPackages() {
local pkg="$1"
# Deduplicate the packages
if [ -z "${_amentPackagesSeen["$pkg"]}" ] && isAmentPackage "$pkg"; then
addToSearchPath AMENT_PREFIX_PATH "$pkg"
fi
_amentPackagesSeen["$pkg"]=1
}
addEnvHooks "$hostOffset" _findAmentPackages