aboutsummaryrefslogtreecommitdiffstats
path: root/ci/check-warnings
blob: cdf84aafb986839326b7c536582e5bb8b886cf52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#! /bin/bash

# Expects the path to a log file as $1, and if this file has any content
# then display the contents and exit with an error code.

set -e -u

LOGFILE=$1

LINES=$(sed -e "/attempting MIRRORS if available/d" -e "/Error parsing .*netrc:/d" $LOGFILE | wc -l)
if test "$LINES" -ne 0; then
    echo ==============================
    echo The build had warnings/errors:
    echo ==============================
    cat $LOGFILE
    exit 1
fi

exit 0