#! /bin/sh

rm -rf themes
rm -rf tests
mkdir themes
mkdir tests

sqlite3 results.sql "select theme from data group by 1;" >/tmp/themes

for theme in `cat /tmp/themes`; do
  ./create-image -p engines-version -s test --theme=$theme themes/$theme.png;
done

sqlite3 results.sql "select test from data group by 1;" >/tmp/tests

for test in `cat /tmp/tests`; do
  ./create-image -p engines-version -s theme --test=$test tests/$test.png
done

rm -f /tmp/tests
rm -f /tmp/themes