forked from chelming/qmk_build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_all.sh
executable file
·23 lines (19 loc) · 987 Bytes
/
build_all.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
this_script=$(readlink -f "${BASH_SOURCE[@]}")
script_dir=$(dirname "$this_script")
export PATH=/home/nickb/gcc-arm/gcc-arm-none-eabi-8-2018-q4-major/bin:$PATH
MAKEFLAGS="-j --output-sync"
pushd "$script_dir/qmk_firmware" >/dev/null 2>&1 \
&& time make $MAKEFLAGS all-chibios:default "$@" 2>&1 | tee "$script_dir/build.log" | egrep '\[(ERRORS|WARNINGS|OK)\]' \
&& popd >/dev/null 2>&1
num_successes=$(cat "$script_dir/build.log" | egrep '\[(OK)\]' | wc -l)
num_skipped=$(cat "$script_dir/build.log" | egrep '\[(SKIPPED)\]' | wc -l)
num_warnings=$(cat "$script_dir/build.log" | egrep '\[(WARNINGS)\]' | wc -l)
num_failures=$(cat "$script_dir/build.log" | egrep '\[(ERRORS)\]' | wc -l)
echo "-------------------------------"
echo "Successful builds: $num_successes"
echo "Skipped builds: $num_skipped"
echo "Warning builds: $num_warnings"
echo "Failing builds: $num_failures"
echo "-------------------------------"
cat "$script_dir/build.log" | egrep '\[(ERRORS)\]'