mirror of
https://github.com/lopsided98/nix-ros-overlay.git
synced 2025-07-14 14:10:37 +03:00
Move ament setup hook to ament_package and fix using it with buildEnv
This commit is contained in:
parent
53559939a8
commit
0719f2f1f5
2 changed files with 5 additions and 6 deletions
|
@ -1,21 +0,0 @@
|
|||
isAmentPackage() {
|
||||
[ -d "$1/share/ament_index" ]
|
||||
}
|
||||
|
||||
declare -gA _amentPackagesSeen
|
||||
|
||||
_findAmentPackages() {
|
||||
local pkg="$1"
|
||||
# Deduplicate the packages
|
||||
if [ -z "${_amentPackagesSeen["$pkg"]:-}" ] \
|
||||
&& isAmentPackage "$pkg" \
|
||||
&& [ -n "$(shopt -s nullglob; echo $pkg/share/*/local_setup.sh)" ]
|
||||
then
|
||||
# ROS scripts use unbound variables
|
||||
set +u
|
||||
source "$pkg"/share/*/local_setup.sh
|
||||
set -u
|
||||
fi
|
||||
_amentPackagesSeen["$pkg"]=1
|
||||
}
|
||||
addEnvHooks "$hostOffset" _findAmentPackages
|
Loading…
Add table
Add a link
Reference in a new issue