summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmailimport8
1 files changed, 7 insertions, 1 deletions
diff --git a/mailimport b/mailimport
index b072bf5f3..31638f902 100755
--- a/mailimport
+++ b/mailimport
@@ -32,6 +32,10 @@ if [ "$EDITOR" == "" ]; then
EDITOR="nano -w"
fi
+if [ "$CHECKPATCH" == "" ]; then
+ CHECKPATCH="/lib/modules/`uname -r`/build/scripts/checkpatch.pl"
+fi
+
DIR=$TMPDIR/mailimport$$
mkdir $DIR
if [ "$?" != "0" ]; then
@@ -194,7 +198,9 @@ for i in $DIR/*; do
echo "Signed-off-by: $CHANGE_LOG_NAME <$CHANGE_LOG_EMAIL_ADDRESS>" >>$DIR/msg2
echo "cat $DIR/author2 $DIR/msg2 $DIR/patch >$out"
- cat $DIR/author2 $DIR/msg2 $DIR/patch >$out
+ $CHECKPATCH -q --notree $i|perl -ne '{ print "# $_"; }' >$out
+ cat $DIR/author2 $DIR/msg2 $DIR/patch >>$out
+
apply_patch $out
done