run: support multiple simultaneous runs and run output directories

This commit is contained in:
Ciro Santilli
2018-06-12 10:29:56 +01:00
parent 37f64de29f
commit 28c70a3824
12 changed files with 171 additions and 88 deletions

2
eeval
View File

@@ -1,5 +1,6 @@
#!/usr/bin/env bash
# echo and eval
set -e
a=
while getopts a OPT; do
case "$OPT" in
@@ -15,6 +16,7 @@ done
shift "$(($OPTIND - 1))"
cmd="$1"
outfile="${2:-/dev/null}"
mkdir -p "$(dirname "$outfile")"
echo "$cmd" | tee $a "$outfile"
eval "$cmd"
exit "$?"