summaryrefslogtreecommitdiff
path: root/tools/ci/jobs/deheader2.sh
blob: 94cf60cbe72c2c6550f8d0ea8af348b01e907ed7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash

export LOGFILE2=deheader2.log

export DATA=$(cat ${LOGFILE})
if [[ -z "${DATA}" ]]; then
    echo "Empty output. Probably wrong search flags."
    exit 1
fi

export DATA=$(grep "error:" ${LOGFILE})
if [[ -n "${DATA}" ]]; then
    echo "Compilation error found"
    exit 1
fi

grep "deheader:" ${LOGFILE} \
| grep -v "deheader: remove <climits> from ./src/being/localplayer.cpp" \
| grep -v "deheader: remove <fstream> from ./src/utils/files.cpp" \
| grep -v "deheader: remove <climits> from ./src/resources/map/map.cpp" \
| grep -v "deheader: remove <sys/time.h> from ./src/resources/wallpaper.cpp" \
| grep -v "deheader: remove <climits> from ./src/units.cpp" > ${LOGFILE2}

export DATA=$(cat ${LOGFILE2})
if [[ -n "${DATA}" ]]; then
    echo "Wrong include files found"
    echo ${DATA}
    exit 1
fi