#!/bin/sh
echo $@ >> tuningresults.txt
echo >> tuningresults.txt

for file in maps/contest1.map maps/contest2.map maps/contest3.map maps/contest4.map maps/contest5.map maps/contest6.map maps/contest7.map maps/contest8.map; do
	/usr/bin/time -f %E -o tuntiming.txt bin/lifter $@ < $file 2>tunout.txt
	text=`tail -n 6 tunout.txt`
	score=`echo $text | sed 's/.*score: \([0-9]*\).*/\1/'`
	time=`cat tuntiming.txt`
	echo "$file: $score ($time)";
	echo "$file: $score ($time)" >> tuningresults.txt
done
