The following commit has been merged in the master branch:
commit 2e4c6692db053fff11cefb5b78070ccc76673305
Author: Raphael Geissert <[email protected]>
Date:   Thu Sep 23 17:54:28 2010 -0500

    rmadison: return a non-zero exit code if curl or wget failed
    
    Signed-off-by: James Vega <[email protected]>

diff --git a/scripts/rmadison.pl b/scripts/rmadison.pl
index 89fff8a..952bd95 100755
--- a/scripts/rmadison.pl
+++ b/scripts/rmadison.pl
@@ -182,13 +182,18 @@ push @args, "t" if $params->{'time'};
 my $url = $params->{'url'} ? $params->{'url'} : $default_url;
 my @url = split /,/, $url;
 
+my $status = 0;
+
 foreach my $url (@url) {
     print "$url:\n" if @url > 1;
     $url = $url_map{$url} if $url_map{$url};
     my @cmd = -x "/usr/bin/curl" ? qw/curl -s -S -L/ : qw/wget -q -O -/;
     system @cmd, $url . (($url =~ m/\?/)?'&':'?')."package=" . join("+", map { 
uri_escape($_) } @ARGV) . "&text=on&" . join ("&", @args);
+    $status = 1 if ($? >> 8 != 0);
 }
 
+exit $status;
+
 =pod
 
 =head1 NAME

-- 
Git repository for devscripts


-- 
To unsubscribe, send mail to [email protected].

Reply via email to