aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/split-speedtest1-script.sh
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2022-08-30 10:04:08 +0000
committerstephan <stephan@noemail.net>2022-08-30 10:04:08 +0000
commitfbf0f488cfe0a240ca219969a334d498a30769b5 (patch)
tree76d0b0d41a2e10d07f1de180223d27c04b8409a3 /ext/wasm/split-speedtest1-script.sh
parent429899ddad8acac2346874184d263f438ac9b4b6 (diff)
downloadsqlite-fbf0f488cfe0a240ca219969a334d498a30769b5.tar.gz
sqlite-fbf0f488cfe0a240ca219969a334d498a30769b5.zip
batch-runner.js: move generated SQL files into ./sql and start adding hand-written ones (like the Mandelbrot) to that set.
FossilOrigin-Name: 06c106a7d23e4486dbed092757b7588688226ad35539ecc31378a8497f59d1ec
Diffstat (limited to 'ext/wasm/split-speedtest1-script.sh')
-rwxr-xr-xext/wasm/split-speedtest1-script.sh4
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