Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 1 | #! /bin/bash |
2 | |||||
3 | # Expects the path to a log file as $1, and if this file has any content | ||||
4 | # then display the contents and exit with an error code. | ||||
5 | |||||
6 | set -e -u | ||||
7 | |||||
8 | LOGFILE=$1 | ||||
9 | |||||
10 | LINES=$(grep --invert-match "attempting MIRRORS if available" $LOGFILE | wc -l) | ||||
11 | if test "$LINES" -ne 0; then | ||||
12 | echo ============================== | ||||
13 | echo The build had warnings/errors: | ||||
14 | echo ============================== | ||||
15 | cat $LOGFILE | ||||
16 | exit 1 | ||||
17 | fi | ||||
18 | |||||
19 | exit 0 |