1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#!/bin/bash set -eu OPTIND=1 seed="" # default to no seed specified while getopts "S:" opt do case "$opt" in S) seed="$OPTARG" ;; esac done shift "$((OPTIND-1))" python3 generate.py exec ${MAKE:-make} -f run-test.mk SEED="$seed"