blob: 89ae955dfe818836ca5c4a82ed7cfc8303875031 [file] [log] [blame]
Brad Bishopbec4ebc2022-08-03 09:55:16 -04001#! /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
6set -e -u
7
8LOGFILE=$1
9
Patrick Williams44b3caf2024-04-12 16:51:14 -050010LINES=$(grep --invert-match "attempting MIRRORS if available" $LOGFILE | wc -l)
Brad Bishopbec4ebc2022-08-03 09:55:16 -040011if test "$LINES" -ne 0; then
12 echo ==============================
13 echo The build had warnings/errors:
14 echo ==============================
15 cat $LOGFILE
16 exit 1
17fi
18
19exit 0