#!/bin/bash

mkdir /tmp/Calibrator
cd /tmp/Calibrator
gcc /ufs/manegold/public_html/Calibrator/calibrator.c -o calibrator -lm
if [ ! "$HOST" ] ; then
	HOST=`hostname`
fi
HOST=${HOST%%.*}
MHZ=`cat /proc/cpuinfo | grep "cpu MHz" | head -1 | sed 's|^.*: \([0-9]*\)\..*$|\1|'`
./calibrator $MHZ 64M $HOST.$MHZ | tee $HOST.$MHZ.log
cp $HOST.$MHZ* /ufs/manegold/public_html/Calibrator/Results/cf2/
