diff options
Diffstat (limited to 'mailimport')
-rwxr-xr-x | mailimport | 23 |
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 |