xref: /openbmc/openbmc/meta-arm/ci/check-warnings (revision 92b42cb3)
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
6set -e -u
7
8LOGFILE=$1
9
10LINES=$(grep --invert-match "attempting MIRRORS if available" $LOGFILE | wc -l)
11if 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
20