VMM: Add our virtio_mmio_dev struct and specify its interface functions
[akaros.git] / scripts / git / git-checkpatch
1 #!/bin/bash
2 # Barret Rhoden (brho@cs.berkeley.edu)
3 # Copyright 2016 Google Inc
4 #
5 # Runs checkpatch on a set of commits, (From, To].
6
7
8 TMPDIR="${TMPDIR:-/tmp/fp-cp}"
9
10 usage()
11 {
12         echo "$0 <from>..<to>"
13         exit -1
14 }
15
16 if [ $# -ne 1 ]
17 then
18         usage
19 fi
20
21 if [ ! -f ./scripts/checkpatch.pl ]
22 then
23         echo "Run from the root of the Akaros repo"
24         exit -1
25 fi
26
27 mkdir -p $TMPDIR
28
29 git format-patch -o $TMPDIR $1
30 ./scripts/checkpatch.pl $TMPDIR/*.patch
31 rm $TMPDIR/*patch