All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Hunold <hunold@convergence.de>
To: Keith Owens <kaos@ocs.com.au>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Need script for submitting multi-part patches
Date: Thu, 30 Oct 2003 13:22:51 +0100	[thread overview]
Message-ID: <3FA1029B.9030106@convergence.de> (raw)
In-Reply-To: <3289.1067514507@ocs3.intra.ocs.com.au>

[-- Attachment #1: Type: text/plain, Size: 440 bytes --]

Hello Keith,

> Several weeks ago, somebody mailed a script for submitting multi-part
> patches (e.g. [patch 3/12]) and automatically threading them.  Searc
> via google and browsing the kernel archives has failed to find it, does
> anybody have a URL?

IIRC it was posted on lkml a few months ago as a response to one of my 
DVB patches.

I picked it up and modified it to fit my needs. I attached it to this 
mail. Have fun!

CU
Michael.

[-- Attachment #2: linus_send --]
[-- Type: text/plain, Size: 2584 bytes --]

#!/usr/bin/perl -w

# horrible hack of a script to send off a large number of email messages, one after
# each other, all chained together.  This is useful for large numbers of patches.
#
# Use at your own risk!!!!
#
# greg kroah-hartman Jan 8, 2002
# <greg@kroah.com>
#
# Released under the artistic license.
#

#
# modify these options each time you run the script
#
#$to = 'torvalds@osdl.org';
$to = 'torvalds@osdl.org, linux-kernel@vger.kernel.org';
#$to = 'linux-kernel@vger.kernel.org, alan@lxorguk.ukuu.org.uk, torvalds@osdl.org';

# If you want to chain the first post, fill this in
$initial_reply_to = '';

# a list of patches to send out, last parameter specifies if message should
# *not* be send, ie. in case of a binary firmware blob, so you can send it out
# manually
@files = (
["00-DVB-LinuxTV.org-CVS-update","LinuxTV.org DVB+V4L fixes" ,"0"],
["01-DVB-important-DVB-fixes.diff","Fix bugs in various DVB drivers","0"],
["02-V4L-saa7146-analog-tv-fix.diff","Fix bug in saa7146 analog tv i2c-handling","0"],
["03-V4L-i2c-helper-fix.diff","Fix bugs in analog tv i2c-helper chipset drivers","0"],
);

#["","","0"],
  
#  Put your name and address here
$from = "Michael Hunold <hunold\@linuxtv.org>";

# Don't need to change anything below here...

use Mail::Sendmail;

# we make a "fake" message id by taking the current number
# of seconds since the beginning of Unix time and tacking on
# a random number to the end, in case we are called quicker than
# 1 second since the last time we were called.
sub make_message_id
{
	my $date = `date "+\%s"`;
	chomp($date);
	my $pseudo_rand = int (rand(4200));
	$message_id = "<$date$pseudo_rand\@convergence.de>";
	print "new message id = $message_id\n";
}

sub send_message
{
	%mail = (	To	=>	$to,
			From	=>	$from,
			Subject	=>	$subject,
			Message	=>	$message,
			'In-Reply-To'	=>	$reply_to,
			'Message-ID'	=>	$message_id,
			'X-Mailer'	=> "gregkh_patchbomb_levon_offspring",
		);

	$mail{smtp} = 'mail';

	sendmail(%mail) or die $Mail::Sendmail::error;

	print "OK. Log says:\n", $Mail::Sendmail::log;
	print "\n\n"
}

$reply_to = $initial_reply_to;
make_message_id();

# Linus wants a [0/xx] mail with a summary description...
$nrfiles = @files-1;
$current = 0;

foreach $t (@files) {
	($F, $subj, $skip) = @$t;

	if ( $skip eq "0" ) {
		open F or die "can't open file $F";
		undef $/;
		$message = <F>;	# slurp the whole file in
		close F;
		$/ = "\n";
		$subject = "[PATCH $current/$nrfiles] $subj";
		send_message();
		$reply_to = $message_id;
		make_message_id();
	}
	
	# set up for the next message
	$current++;
}




      reply	other threads:[~2003-10-30 12:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-30 11:48 Need script for submitting multi-part patches Keith Owens
2003-10-30 12:22 ` Michael Hunold [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3FA1029B.9030106@convergence.de \
    --to=hunold@convergence.de \
    --cc=kaos@ocs.com.au \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.