-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrunTests.sh
More file actions
executable file
·30 lines (29 loc) · 903 Bytes
/
runTests.sh
File metadata and controls
executable file
·30 lines (29 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
mathoid=`pwd`/node_modules/mathoid/server.js
if [ -f $mathoid ]; then
echo "Running mathoid from $mathoid"
else
echo "$mathoid not found."
echo "install mathoid via 'npm i mathoid'"
exit
fi
for file in `pwd`/config/*.yaml
do
# from https://stackoverflow.com/questions/3362920/get-just-the-filename-from-a-path-in-a-bash-script
xbase=${file##*/}
xpref=${xbase%.*}
echo "starting mathoid with config $xpref"
$mathoid -c $file >./results/mathoid-$xpref.log &
echo "wait for mathoid to start"
sleep 2s
for sample in `pwd`/data/*.txt
do
sbase=${sample##*/}
spref=${sbase%.*}
echo "processing $sample"
curl --silent -d "@$sample" localhost:10044/svg > ./results/svg-${spref}-${xpref}.svg
curl --silent -d "@$sample" localhost:10044/png > ./results/png-${spref}-${xpref}.png
done
kill %
done
kill %%