| 1 | #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. sh |
| 2 | # |
| 3 | # SPDX-License-Identifier: GPL-2.0-only |
| 4 | |
| 5 | # DESCR: Verify that the word 'coreboot' is lowercase |
| 6 | |
| 7 | LINTDIR="$( |
| 8 | cd -- "$(dirnamescip-shell system . . dirname. "$0")" > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1 || return |
| 9 | pwdscip-shell system . . pwd. -P |
| 10 | )" |
| 11 | |
| 12 | # shellcheck source=helper_functions.sh |
| 13 | . "${LINTDIR}/helper_functions.sh" |
| 14 | |
| 15 | EXCLUDE='^3rdparty/\|util/crossgcc/xgcc\|coreboot\|COREBOOT\|CorebootPayload\|CorebootModule\|minnowboard.org/Coreboot\|.*\.patch$\|CorebootBdsLib\|^payloads/external' |
| 16 | |
| 17 | # # Check last commit message if the code is in a git repo |
| 18 | if [scip-shell system . . `[`. "${IN_GIT_TREE}" -eq 1 ]; then |
| 19 | if [scip-shell system . . `[`. -n "$(${GIT} log -n 1 | grepscip-shell system . . grep. -i 'coreboot' | grepscip-shell system . . grep. -v "$EXCLUDE" )" ]; then |
| 20 | echoscip-shell system . . echo. "'coreboot' should be lowercase in commit message" |
| 21 | fi |
| 22 | fi |
| 23 | |
| 24 | ${GREP_FILES} -inI "coreboot" | grepscip-shell system . . grep. -v "$EXCLUDE"; |