From 3497076e048f4aa9c4bea729d9a4070fe4dcfe66 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 31 Oct 2009 17:54:53 -0400 Subject: Capture error code correctly in tools/proof --- tools/proof | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tools/proof') diff --git a/tools/proof b/tools/proof index 04afc097..0922d9e7 100755 --- a/tools/proof +++ b/tools/proof @@ -4,8 +4,10 @@ set -e rm -fr ~/Products/ledger* -if ./acprep -j16 --warn proof 2>&1 | tee ~/Desktop/proof.log; then - echo "Ledger proof build succeeded" -else +./acprep -j16 --warn proof 2>&1 | tee ~/Desktop/proof.log + +if egrep -q '(ERROR|CRITICAL)' ~/Desktop/proof.log; then notify "Ledger proof build failed" +else + echo "Ledger proof build succeeded" fi -- cgit v1.2.3 From 10755df8ae9348ff0dab2d53b24794766128c484 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 1 Nov 2009 06:01:33 -0500 Subject: Added an --alert option to tools/proof --- tools/proof | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tools/proof') diff --git a/tools/proof b/tools/proof index 0922d9e7..7acc92fd 100755 --- a/tools/proof +++ b/tools/proof @@ -7,7 +7,14 @@ rm -fr ~/Products/ledger* ./acprep -j16 --warn proof 2>&1 | tee ~/Desktop/proof.log if egrep -q '(ERROR|CRITICAL)' ~/Desktop/proof.log; then - notify "Ledger proof build failed" + if [ "$1" = "--alert" ]; then + notify "Ledger proof build FAILED" + else + echo "Ledger proof build FAILED" + exit 1 + fi else echo "Ledger proof build succeeded" fi + +exit 0 -- cgit v1.2.3