latest pushes

This commit is contained in:
Ronaldson Bellande 2024-05-09 20:18:45 -04:00
parent d2b317d72a
commit c53d5b3639
2 changed files with 31 additions and 0 deletions

27
scripts/build_docker.sh Executable file
View File

@ -0,0 +1,27 @@
#!/bin/bash
# Check user input
if [ "$1" = "ros1" ]; then
# Define the Dockerfile name and tag for ROS 1
DOCKERFILE="../Dockerfile/Dockerfile.ros1"
IMAGE_NAME="bellande_api_configs_packages_ros1"
elif [ "$1" = "ros2" ]; then
# Define the Dockerfile name and tag for ROS 2
DOCKERFILE="../Dockerfile/Dockerfile.ros2"
IMAGE_NAME="bellande_api_configs_packages_ros2"
else
echo "Invalid input. Please provide either 'ros1' or 'ros2'."
exit 1
fi
TAG="latest" # Change this to the desired tag for your Docker image
# Build the Docker image
docker build -t $IMAGE_NAME:$TAG -f $DOCKERFILE .
# Check if the image was built successfully
if [ $? -eq 0 ]; then
echo "Docker image $IMAGE_NAME:$TAG built successfully."
else
echo "Error: Failed to build Docker image."
fi

4
scripts/catkin_setup.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
catkin build
source "$CATKIN_WS/devel/setup.bash"