Use trap to catch and report failures.

This commit is contained in:
Pavel Roskin 2005-11-11 05:57:46 +00:00
parent 0cfb000426
commit 4d7182a39f
1 changed files with 3 additions and 0 deletions

View File

@ -5,6 +5,8 @@
set -e
trap 'echo >&2 "ERROR: Test not completed, exit with code $?"; exit 1' exit
distcheck() {
id="$1"
shift
@ -70,4 +72,5 @@ else
echo "rpmbuild not found"
fi
trap - exit
echo "All done. No fatal errors. Please check test*.err files."