#!/bin/bash

COMP=${COMP:-'meld'}

case "$1" in 
	run)
		bench/benchmark | tee bench-`hostname`-`date +'%Y%m%d-%H:%M:%S'`.txt
		;;
	comp|compare)
		$COMP $(ls bench-$(hostname)-* | sort | tail -2)
		;;
	*)
		echo "Usage: $0 {run|compare}" >&2
		;;
esac

exit 0
