From 50ca6bbb02415947bf6b3e67bb08188a664ebc25 Mon Sep 17 00:00:00 2001 From: "rhelmer%mozilla.com" Date: Thu, 27 Dec 2007 00:00:17 +0000 Subject: [PATCH] more correct error checking for binary diff fail feature r=cf b=408157 --- testing/release/common/check_updates.sh | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/testing/release/common/check_updates.sh b/testing/release/common/check_updates.sh index ff3a77f2bbd..5f55a1efd77 100755 --- a/testing/release/common/check_updates.sh +++ b/testing/release/common/check_updates.sh @@ -58,20 +58,28 @@ check_updates () { fi diff -r source/$platform_dirname target/$platform_dirname > results.diff - err=$? + diffErr=$? cat results.diff grep '^Binary files' results.diff > /dev/null - if [ $? == 0 ] + grepErr=$? + if [ $grepErr == 0 ] then echo "FAIL: binary files found in diff" return 1 - elif [ -s results.diff ] + elif [ $grepErr == 1 ] then - echo "WARN: non-binary files found in diff" - return 2 + if [ -s results.diff ] + then + echo "WARN: non-binary files found in diff" + return 2 + fi else - # unknown error - echo "FAIL: Unknown error from diff exit code: $err" + echo "FAIL: unknown error from grep: $grepErr" + return 3 + fi + if [ $diffErr != 0 ] + then + echo "FAIL: unknown error from diff: $diffErr" return 3 fi }