File: mock-wrapper

package info (click to toggle)
olpc-kbdshim 12-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 208 kB
  • ctags: 178
  • sloc: ansic: 1,868; sh: 132; makefile: 73
file content (7 lines) | stat: -rwxr-xr-x 269 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
#!/bin/bash
# wraps mock so that it gives a proper error return if it fails.
set -o pipefail
( /usr/bin/mock "$@" 2>&1 | tee rpms/mock.out ) || exit $?
# now grep through mock.out to see if an ERROR was flagged.
grep -q "^ERROR:" rpms/mock.out && exit 1 # fail!
exit 0