summaryrefslogtreecommitdiff
path: root/mailimport
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-03-10 09:51:43 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-03-10 09:51:43 -0300
commit8c34ccf509dbd0775074c48d5a88b61a7bdc924e (patch)
tree8efe83af529caf9eadd6044f3e63869f2836cad7 /mailimport
parent5d8e954c2cbba759dc200b3acd3f5a75801e5a2c (diff)
downloadmediapointer-dvb-s2-8c34ccf509dbd0775074c48d5a88b61a7bdc924e.tar.gz
mediapointer-dvb-s2-8c34ccf509dbd0775074c48d5a88b61a7bdc924e.tar.bz2
Better proccess -mm patches
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'mailimport')
-rwxr-xr-xmailimport23
1 files changed, 21 insertions, 2 deletions
diff --git a/mailimport b/mailimport
index 614ae6519..7b233932e 100755
--- a/mailimport
+++ b/mailimport
@@ -18,6 +18,25 @@
head=v4l/scripts/hghead.pl
+edit_patch()
+{
+ next=$1
+
+ if [ "`grep 'has been added to the -mm tree. Its filename is' $next`" != "" ]; then
+ newfile="$TMPDIR/next2_$$"
+
+ echo Processing -mm file $next
+
+ perl -e 'while (<>) { if (m/Date:/) { print $_; };
+ if (m/^------------------------------------------------------/) {
+ print <>; exit;
+ }}' $next >$newfile;
+ mv $tmp/$newfile $next;
+ fi
+ echo Editing $next
+ $EDITOR $next
+}
+
####################################################################
# Tries to apply a patch at the tree
@@ -44,14 +63,14 @@ apply_patch () {
fi
echo "** Edit file $next"
sleep 1
- $EDITOR $next
+ edit_patch $next
else
echo "Patch applied OK against $pdir"
cont=0
fi
done
- $EDITOR $next
+ edit_patch $next
unset cont
until [ "$cont" == "0" ]; do