blob: cdf84aafb986839326b7c536582e5bb8b886cf52 [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 Williams03514f12024-04-05 07:04:11 -050010LINES=$(sed -e "/attempting MIRRORS if available/d" -e "/Error parsing .*netrc:/d" $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