akaros/scripts/git/git-checkpatch
<<
>>
Prefs
   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
   8TMPDIR="${TMPDIR:-/tmp/fp-cp}"
   9
  10usage()
  11{
  12        echo "$0 <from>..<to>"
  13        exit -1
  14}
  15
  16if [ $# -ne 1 ]
  17then
  18        usage
  19fi
  20
  21if [ ! -f ./scripts/checkpatch.pl ]
  22then
  23        echo "Run from the root of the Akaros repo"
  24        exit -1
  25fi
  26
  27mkdir -p $TMPDIR
  28
  29git format-patch -o $TMPDIR $1
  30./scripts/checkpatch.pl $TMPDIR/*.patch
  31rm $TMPDIR/*patch
  32