generated from wessel/boilerplate
chore(fish): Update env files
This commit is contained in:
@@ -1,22 +1,25 @@
|
||||
# Self-contained environment: ros2-assignments
|
||||
# Exported on: Tue Sep 23 09:41:57 AM CEST 2025
|
||||
# Exported on: Tue Sep 23 10:20:42 AM CEST 2025
|
||||
# Original environment from: /home/wessel/.config/fish/environments/configs/ros2-assignments
|
||||
|
||||
# ROS2 development environment (requires distrobox)
|
||||
# Environment: ros2-assignments
|
||||
|
||||
# First check if running inside distrobox
|
||||
if not test -f /run/.containerenv; and test -z "$CONTAINER_ID"
|
||||
echo (set_color red)"This ROS2 environment should only be run inside a distrobox container"(set_color normal)
|
||||
return 1
|
||||
end
|
||||
|
||||
# Check if a previous initialization has occurred
|
||||
if test -n "$__ENV_INITIALIZED"
|
||||
echo (set_color yellow)"Environment already initialized"(set_color normal)
|
||||
return 0
|
||||
end
|
||||
|
||||
# Mark as initialized
|
||||
# Mark as initialized (only after distrobox check passes)
|
||||
set -gx __ENV_INITIALIZED "1"
|
||||
set -gx CURRENT_ENV "ros2-assignments"
|
||||
|
||||
# Check if running inside distrobox
|
||||
if test -f /run/.containerenv; or test -n "$CONTAINER_ID"
|
||||
# Source ROS2 setup files using bass
|
||||
if type -q bass
|
||||
bass source /opt/ros/jazzy/setup.bash
|
||||
@@ -60,10 +63,6 @@ if test -f /run/.containerenv; or test -n "$CONTAINER_ID"
|
||||
alias ctr="colcon test-result"
|
||||
|
||||
echo (set_color green)"Activated ROS2 environment: ros2-assignments"(set_color normal)
|
||||
else
|
||||
echo (set_color red)"This ROS2 environment should only be run inside a distrobox container"(set_color normal)
|
||||
return 1
|
||||
end
|
||||
|
||||
# Custom deactivation function
|
||||
function __env_custom_deactivate
|
||||
|
||||
Reference in New Issue
Block a user