run.sh 904 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. ## Handle different argument patterns
  3. if [ $# -eq 1 ]; then
  4. # Single file number
  5. cargo run --profile dev --bin test -- $1
  6. elif [ $# -eq 3 ] && [ "$2" = "branch" ]; then
  7. # File number with branch: run.sh 26 branch fixinghql-error-file26
  8. cargo run --profile dev --bin test -- $1 --branch $3
  9. elif [ $# -eq 2 ] && [ "$1" = "branch" ]; then
  10. # Branch only: run.sh branch fixinghql-error-file26
  11. cargo run --profile dev --bin test -- --branch $2
  12. elif [ $# -eq 3 ] && [ "$1" = "batch" ]; then
  13. # Batch mode: run.sh batch 10 1
  14. cargo run --profile dev --bin test -- --batch $2 $3
  15. elif [ $# -eq 5 ] && [ "$1" = "batch" ] && [ "$4" = "branch" ]; then
  16. # Batch with branch: run.sh batch 10 1 branch fixinghql-error-file26
  17. cargo run --profile dev --bin test -- --batch $2 $3 --branch $5
  18. else
  19. # Default: process all files
  20. cargo run --profile dev --bin test
  21. fi