2012-02-25 19:52:45 +01:00
|
|
|
#!/bin/sh
|
2018-01-04 21:31:29 +01:00
|
|
|
|
|
|
|
##
|
|
|
|
## This file is part of the coreboot project.
|
|
|
|
##
|
|
|
|
## Copyright (C) 2015 Patrick Georgi <patrick@georgi-clan.de>
|
|
|
|
##
|
|
|
|
## This program is free software; you can redistribute it and/or modify
|
|
|
|
## it under the terms of the GNU General Public License as published by
|
|
|
|
## the Free Software Foundation; version 2 of the License.
|
|
|
|
##
|
|
|
|
## This program is distributed in the hope that it will be useful,
|
|
|
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
## GNU General Public License for more details.
|
|
|
|
##
|
|
|
|
|
2018-01-05 06:19:10 +01:00
|
|
|
set -e # -o errexit
|
|
|
|
set -u # -o nounset
|
|
|
|
|
2015-02-11 01:53:42 +01:00
|
|
|
%MAKE% lint-stable
|
2017-07-26 18:38:42 +02:00
|
|
|
|
2018-05-30 15:48:16 +02:00
|
|
|
PATCHDIFF=$(git diff --cached --src-prefix=a/ --dst-prefix=b/)
|
2018-01-03 09:12:39 +01:00
|
|
|
if printf "%s\n" "$PATCHDIFF" | grep -q "@@"; then
|
2017-07-26 18:38:42 +02:00
|
|
|
echo
|
|
|
|
echo "Running checkpatch"
|
2018-05-30 15:54:08 +02:00
|
|
|
printf "%s\n" "$PATCHDIFF" | util/lint/lint-007-checkpatch diff
|
2017-07-26 18:38:42 +02:00
|
|
|
fi
|