Fix run_webots.sh exit-1 when N=0 (calibration mode)

`active=$(grep -c '^Sheep' "$DST")` returns 0 with exit code 1 when
no sheep are left in the world, which fires set -e and kills the
script before it can launch Webots. Wrap with `|| true` so the
calibration mode (N=0) can actually run.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Johnny Fernandes
2026-05-16 20:40:28 +00:00
parent 2d23289052
commit 03b2df5656
+1 -1
View File
@@ -115,7 +115,7 @@ for i in $(seq $((N+1)) 10); do
sed -i "s|^Sheep .* \"sheep${i}\".*|# &|" "$DST"
done
active=$(grep -c '^Sheep' "$DST")
active=$(grep -c '^Sheep' "$DST" || true)
echo "------------------------------------------------------------"
echo "World : $DST"
echo "Mode : $MODE"