Package: watchupstream
Version: 0.5.1
Severity: wishlist
Tags: patch

It would be convenient if this option defaulted to the user's
$DEBEMAIL variable. Attached are patches.

-- 
_________________________
Ryan Niebur
[email protected]
--- ./watchupstream     2008-07-04 05:11:18.000000000 -0700
+++ ./watchupstream.email       2009-04-08 00:04:47.000000000 -0700
@@ -26,7 +26,7 @@
 # read command line options
 use Getopt::Long;
 my $packre = '';
-my $maintre = '';
+my $maintre = undef;
 my $installed = '';
 my $all = '';
 my $nocache = '';
@@ -40,7 +40,7 @@
 GetOptions
 (
        "packre=s"  => \$packre,
-       "maintre=s"  => \$maintre,
+       "maintre:s"  => \$maintre,
        "installed" => \$installed,
        "all" => \$all,
        "nocache"  => \$nocache,
@@ -55,6 +55,13 @@
 $export = 1 if( $try );
 $nocache = 1 if( $try );
 $nocache = 1 if( $export );
+if(defined($maintre) && length($maintre) == 0) {
+    $maintre = $ENV{'DEBEMAIL'};
+    $maintre ||= $ENV{'EMAIL'};
+    if(! $maintre) {
+        die("You must either pass an argument to --maintre or have DEBEMAIL or 
EMAIL set in your environment");
+    }
+}
 
 # create user configuration directory
 my $usrcfgdir = glob( "~/.watchupstream" );
--- watchupstream.1     2009-04-07 23:03:37.000000000 -0700
+++ watchupstream.1.email       2009-04-08 00:13:36.000000000 -0700
@@ -56,6 +56,10 @@
 Use the given regular expression
 on the "Maintainer:" field
 to select packages to be queried.
+If a regular expression is not
+specified, it will default to the
+DEBEMAIL or EMAIL environment
+variables.
 .TP
 .B \-\-include-uploaders
 Match the regular expression given

Attachment: signature.asc
Description: Digital signature

Reply via email to