diff options
Diffstat (limited to 'ext/wasm/split-speedtest1-script.sh')
-rwxr-xr-x | ext/wasm/split-speedtest1-script.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/wasm/split-speedtest1-script.sh b/ext/wasm/split-speedtest1-script.sh index e228a872e..e072d08a1 100755 --- a/ext/wasm/split-speedtest1-script.sh +++ b/ext/wasm/split-speedtest1-script.sh @@ -7,9 +7,11 @@ if [ x = "x${testnums}" ]; then echo "Could not parse any begin/end blocks out of $infile" 1>&2 exit 1 fi +odir=${infile%%/*} +if [ "$odir" = "$infile" ]; then odir="."; fi #echo testnums=$testnums for n in $testnums; do - ofile=$(printf "speedtest1-%03d.sql" $n) + ofile=$odir/$(printf "speedtest1-%03d.sql" $n) sed -n -e "/^-- begin test $n /,/^-- end test $n\$/p" $infile > $ofile echo -e "$n\t$ofile" done |