linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Levon <levon@movementarian.org>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Michael Hunold <hunold@convergence.de>,
	linux-kernel@vger.kernel.org,
	Holger Waechtler <holger@convergence.de>,
	Johannes Stezenbach via CVS <js@convergence.de>
Subject: Re: DVB updates, 3rd try
Date: Wed, 18 Jun 2003 17:12:54 +0100	[thread overview]
Message-ID: <20030618161253.GA53261@compsoc.man.ac.uk> (raw)
In-Reply-To: <Pine.LNX.4.44.0306180849150.9782-100000@home.transmeta.com>

On Wed, Jun 18, 2003 at 08:58:43AM -0700, Linus Torvalds wrote:

> 	[DVB PATCH 1/9] Replace frobutomic counter with sequence numbers

People might find the below script (hacked from gregkh's version) useful
for doing this. Should be fairly obvious.

regards,
john

#!/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@transmeta.com, linux-kernel@vger.kernel.org';
$to = 'levon@movementarian.org';

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

# a list of patches to send out
@files = (
["shutdown.diff", "OProfile: small NMI shutdown fix"],
["ioapic.diff", "OProfile: IO-APIC based NMI delivery"],
["exec.diff", "OProfile: thread switching performance fix"],
);

# Put your name and address here
$from = "John Levon <levon\@movementarian.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\@movementarian.org>";
	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} = 'localhost';

	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();
$nrfiles = @files;
$current = 1;

foreach $t (@files) {
	($F, $subj) = @$t;
	open F or die "can't open file $t";
	undef $/;
	$message = <F>;	# slurp the whole file in
	close F;
	$/ = "\n";
	$subject = "[PATCH $current/$nrfiles] $subj";
	send_message();

	# set up for the next message
	$reply_to = $message_id;
	make_message_id();
	$current++;
}



  reply	other threads:[~2003-06-18 15:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-27 13:08 DVB updates, 2nd try Michael Hunold
2003-05-28 10:12 ` Christoph Hellwig
2003-05-28 12:54   ` Michael Hunold
2003-05-28 12:58     ` Christoph Hellwig
2003-06-18 11:49   ` DVB updates, 3rd try Michael Hunold
2003-06-18 15:58     ` Linus Torvalds
2003-06-18 16:12       ` John Levon [this message]
2003-06-19  1:45         ` jw schultz
2003-06-19  2:13           ` John Levon
2003-06-19  8:55             ` jw schultz
2003-06-18 19:39       ` Johannes Stezenbach

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=20030618161253.GA53261@compsoc.man.ac.uk \
    --to=levon@movementarian.org \
    --cc=holger@convergence.de \
    --cc=hunold@convergence.de \
    --cc=js@convergence.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).