#!/bin/sh

#
# Run this script to compare the proofs status in your current tree
# to the one in the clean tree in the last successful nightly run.
#
# For best results, use THEORIES=all and TESTS=no (since this is what
# the nightly run uses).
#

if [ ! -d editor/ml ]; then
   echo "Should be ran from MetaPrl root"
   exit 1
fi
if [ ! -f mk/config ]; then
   echo "You need a valid mk/config"
   exit 1
fi
if grep -qi '^THEORIES *= *ALL$' mk/config ; then :; else
   echo "Warning: to make the comparison more adequate, use THEORIES=all in mk/config"
fi
if grep -qi '^TESTS *= *NO$' mk/config ; then :; else
   echo "Warning: to make the comparison more adequate, use TESTS=no in mk/config"
fi
ssh -a -x -n -o BatchMode=yes localhost `pwd`/util/check-status.sh `pwd`&
date "+%c: check-status.sh spawned, results should be emailed to you in a little while"
