#!/bin/sh

#Initial input
make clean

# Loop, loop, loop, debugging
while [ "true" ];
do
    #Only needs to run when any updates did occur
    make -q
    if [ $? -ne 0 ]; then
        echo "#"
        echo "# Build: `date`"
        echo "#"
        make &&  sleep 1 && sh calculate.sh
    fi
    sleep 10
done
