X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/b5fbb296ba776e85f1fee2c384bf33ce5587df06..9ac9df93e9b7a209b603246f72a753b94daae419:/scripts/download.pl diff --git a/scripts/download.pl b/scripts/download.pl index 50ecfc696..7d2c41e0d 100755 --- a/scripts/download.pl +++ b/scripts/download.pl @@ -24,7 +24,7 @@ sub localmirrors { open LM, "$scriptdir/localmirrors" and do { while () { chomp $_; - push @mlist, $_; + push @mlist, $_ if $_; } close LM; }; @@ -136,9 +136,9 @@ foreach my $mirror (@ARGV) { push @mirrors, "ftp://ftp.digex.net/pub/gnu/$1"; } elsif ($mirror =~ /^\@KERNEL\/(.+)$/) { my @extra = ( $1 ); - if ($filename =~ /linux-\d+\.\d+\.\d+-rc/) { + if ($filename =~ /linux-\d+\.\d+(?:\.\d+)?-rc/) { push @extra, "$extra[0]/testing"; - } elsif ($filename =~ /linux-(\d+\.\d+\.\d+)/) { + } elsif ($filename =~ /linux-(\d+\.\d+(?:\.\d+)?)/) { push @extra, "$extra[0]/longterm/v$1"; } foreach my $dir (@extra) {