File: mock-wrapper

package info (click to toggle)
olpc-powerd 23-3
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 1,016 kB
  • sloc: sh: 4,456; ansic: 887; makefile: 72
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