3 # SPDX-License-Identifier: GPL-2.0-only
5 # DESCR: Verify that the word 'coreboot' is lowercase
9 EXCLUDE
='^3rdparty/\|util/crossgcc/xgcc\|Binary file\|coreboot\|COREBOOT\|CorebootPayload\|CorebootModule\|minnowboard.org/Coreboot\|.*\.patch$\|CorebootBdsLib\|^payloads/external'
11 # Use git grep if the code is in a git repo, otherwise use grep.
12 if [ -n "$(command -v git)" ] && \
13 [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]
15 GREP_FILES
="git grep -in"
17 # Check last commit message
18 if [ -n "$(git log -n 1 | grep -i 'coreboot' | grep -v "$EXCLUDE" )" ]; then
19 echo "'coreboot' should be lowercase in commit message"
22 GREP_FILES
="grep -rin"
25 ${GREP_FILES} "coreboot" |
grep -v "$EXCLUDE";