#!/bin/bash set -e iterations="" while [[ $# -gt 0 ]]; do case $1 in --iterations) iterations="$2" shift 2 ;; *) echo "Unknown option: $1" echo "Usage: $0 [--max-iterations N]" exit 1 ;; esac done if [[ -n "$iterations" ]]; then echo "Running limbo_sim for $iterations iterations..." for ((i=1; i<=iterations; i++)); do echo "Iteration $i of $iterations" cargo run -p limbo_sim done echo "Completed $iterations iterations" else echo "Running limbo_sim in infinite loop..." while true; do cargo run -p limbo_sim done fi