Skip to content

Commit

Permalink
Add manipulation run script to run.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilianoHFlores authored and EmilianoHFlores committed Jan 13, 2025
1 parent 785a92c commit a790dc0
Showing 1 changed file with 37 additions and 3 deletions.
40 changes: 37 additions & 3 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,45 @@ fi

echo "Service name is: $INPUT"

# check arguments passed as --help or -h
if [ "$INPUT" == "--help" ] || [ "$INPUT" == "-h" ]; then
echo "Usage: ./run.sh [service_name]"
echo "Example: ./run.sh vision"
exit 0
fi

area=""
rebuild=0

case $INPUT in
vision)
echo "Running vision..."
cd docker/vision
./run.sh
area="vision"
;;
manipulation)
echo "Running manipulation"
area="manipulation"
;;
rebuild)
echo "Rebuilding all services..."
rebuild=1
;;
*)
echo "Invalid service name provided. Valid args are: vision, hri, etc"
exit 1
;;
esac

if [ -z "$area" ]; then
echo "Invalid service name provided. Valid args are: vision, hri, etc"
exit 1
fi

esac
cd docker/$area
if [ $rebuild -eq 1 ]; then
echo "Rebuilding image from area: $area"
./run.sh --rebuild
else
echo "Running image from area: $area"
./run.sh
fi

0 comments on commit a790dc0

Please sign in to comment.