aboutsummaryrefslogtreecommitdiff
path: root/scripts/ci-checkpatches.sh
blob: 4ce0773427d4a3d197c6b9d4d18abdfd5e211108 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash -x

PATCHES=$1
echo "Run checkpatch for ${PATCHES}"
# Generate patches provided with $1. If commit range is not available validate
# only the latest commit.

if [ "$PATCHES" = "" ]; then
	git format-patch -1 -M HEAD;
else
	git format-patch ${PATCHES}
fi

perl ./scripts/checkpatch.pl *.patch;
exit $?