oc-k8s/build_opencloud_microservices.sh

19 lines
450 B
Bash
Raw Normal View History

2025-01-22 14:21:31 +01:00
#!/bin/bash
2025-02-24 10:00:06 +01:00
# Get the target from the first argument or use "all" as default
TARGET=${1:-all}
find .. -mindepth 2 -maxdepth 2 -name 'Makefile' | while read -r makefile; do
2025-01-22 14:21:31 +01:00
dir=$(dirname "$makefile")
2025-02-24 10:00:06 +01:00
echo "Running 'make $TARGET' in $dir"
2025-01-22 14:21:31 +01:00
(
2025-02-24 10:00:06 +01:00
cd "$dir" && make "$TARGET"
2025-01-22 14:21:31 +01:00
)
if [ $? -ne 0 ]; then
2025-02-24 10:00:06 +01:00
echo "Error: make $TARGET failed in $dir"
2025-01-22 14:21:31 +01:00
exit 1
fi
done
echo "All make processes completed successfully."