| 1 |
#!/bin/bash |
| 2 |
# wraps mock so that it gives a proper error return if it fails. |
| 3 |
set -o pipefail |
| 4 |
( /usr/bin/mock "$@" 2>&1 | tee rpms/mock.out ) || exit $? |
| 5 |
# now grep through mock.out to see if an ERROR was flagged. |
| 6 |
grep -q "^ERROR:" rpms/mock.out && exit 1 # fail! |
| 7 |
exit 0 |