diff options
-rwxr-xr-x | rpmbuildupdate | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rpmbuildupdate b/rpmbuildupdate index ccc8308..24035b0 100755 --- a/rpmbuildupdate +++ b/rpmbuildupdate @@ -122,16 +122,18 @@ sub build foreach (@url) { + my $basename = `basename $_`; chomp($basename); if(/ftp\.redhat\.com.*SRPMS/) { $found = 1; opendir(MP, $config{rawhide}) or die "$config{rawhide} is not a directory"; my @rpmsrh = readdir(MP); + my $pkgrpmrh; foreach (@rpmsrh) { if(m|^($pkge)-([^-]+)-([^-]+)\.[^\.]+\.rpm|) - { my $pkgrpmrh = $_; last;} + { $pkgrpmrh = $_; last;} } closedir(MP); @@ -158,7 +160,6 @@ sub build print "Trying $_...\n"; system("wget ".$_); - my $basename = `basename $_`; chomp($basename); if($basename =~ /gz/) { s/gz/bz2/; |