blob: 7b1a021155bdc1459b190d7a3925598527a9632d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/bin/bash
original_exit_code="${ret:-1}"
log_dir_path="${1:-logs}"
context="${2:-10}"
show_make_build_errors() {
grep -slr 'make\[[[:digit:]]\+\].*Error [[:digit:]]\+$' "$log_dir_path" | while IFS= read -r log_file; do
printf "====== Make errors from %s ======\n" "$log_file";
grep -r -C"$context" 'make\[[[:digit:]]\+\].*Error [[:digit:]]\+$' "$log_file" ;
done
}
show_make_build_errors
exit "$original_exit_code"
|