| 1 |
hertzog |
1324 |
#!/usr/bin/perl -w
|
| 2 |
|
|
|
| 3 |
|
|
# Copyright 2006 Raphael Hertzog <hertzog@debian.org>
|
| 4 |
|
|
# Available under the terms of the General Public License version 2
|
| 5 |
|
|
# or (at your option) any later version
|
| 6 |
|
|
|
| 7 |
|
|
use lib '/org/packages.qa.debian.org/perl';
|
| 8 |
|
|
use lib '/home/rhertzog/partages/debian/cvs/pts/perl';
|
| 9 |
|
|
|
| 10 |
|
|
use DB_File;
|
| 11 |
|
|
use strict;
|
| 12 |
|
|
|
| 13 |
|
|
require "common.pl";
|
| 14 |
|
|
|
| 15 |
|
|
my $email = shift;
|
| 16 |
|
|
my $count = 0;
|
| 17 |
|
|
|
| 18 |
|
|
foreach my $pkg (which($email)) {
|
| 19 |
|
|
if (unsubscribe($email, $pkg)) {
|
| 20 |
|
|
print "Unsubscription of $email from $pkg.\n";
|
| 21 |
|
|
$count++;
|
| 22 |
|
|
}
|
| 23 |
|
|
}
|
| 24 |
|
|
if (! $count) {
|
| 25 |
|
|
print "No subscriptions cancelled (bad email?).\n";
|
| 26 |
|
|
print "Usage: bin/unsub-all.pl <email>\n";
|
| 27 |
|
|
}
|
| 28 |
|
|
|