#!/bin/bash set -e ledger_proof() { SRC="$1" DEST="$2" LOGDIR="$3" cd "$SRC" VERSION=$(git describe --all --long) if [[ -f $DEST/last-proofed && $(< $DEST/last-proofed) = $VERSION ]]; then echo "No need to run tools/proof again" exit 0 fi sudo rm -fr $DEST/ledger-proof date > $LOGDIR/ledger-proof.log time nice -n 20 \ ./acprep --debug --enable-doxygen --universal --gcc47 -j16 proof 2>&1 | \ tee -a $LOGDIR/ledger-proof-gcc47.log time nice -n 20 \ ./acprep --debug --enable-doxygen --universal --python --gcc47 -j16 proof 2>&1 | \ tee -a $LOGDIR/ledger-proof-gcc47-python.log #time nice -n 20 \ # ./acprep --debug --enable-doxygen --universal --clang -j16 proof 2>&1 | \ # tee -a $LOGDIR/ledger-proof-clang.log # #time nice -n 20 \ # ./acprep --debug --enable-doxygen --universal --python --clang -j16 proof 2>&1 | \ # tee -a $LOGDIR/ledger-proof-clang-python.log if egrep -q '(ERROR|CRITICAL)' $LOGDIR/ledger-proof.log; then mutt -a $LOGDIR/ledger-proof.log \ -s '[ledger] Proof build FAILED' johnw@newartisans.com < $DEST/last-proofed cd $DEST/ledger-proof-python-gcc47/debug; make docs cd $DEST/ledger-proof-python-gcc47/gcov; make report mutt -s '[ledger] Proof build succeeded' johnw@newartisans.com <