| 1 | #!/usr/bin/env sh |
| 2 | ## |
| 3 | ## SPDX-License-Identifier: GPL-2.0-only |
| 4 | |
| 5 | set -e # -o errexit |
| 6 | set -u # -o nounset |
| 7 | |
| 8 | %MAKE% check-style lint-stable |
| 9 | |
| 10 | PATCHDIFF=$(git diff --cached --src-prefix=a/ --dst-prefix=b/) |
| 11 | if printf "%s\n" "$PATCHDIFF" | grep -q "@@"; then |
| 12 | echo |
| 13 | echo "Running checkpatch" |
| 14 | printf "%s\n" "$PATCHDIFF" | util/lint/lint-007-checkpatch diff \ |
| 15 | || (echo "Please consider fixing these issues." ;sleep 5) ; true |
| 16 | fi |