#
#
# This script is designed to poll download sites after posting a release
# and print out notice as each becomes available. The RM can use this
# script to delay the release announcement until the release can be
# downloaded.
#
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
use strict;
use warnings;
my $version;
my $interval = 300;
my $quiet = 0;
my $usage = "$0 -v version [ -i interval (seconds; default: 300) ]";
unless ($result) {
exit(1);
}
print STDERR "You must specify the release version.\n$usage";
exit(1);
}
my $previously_selected = select STDOUT;
$| = 1; # turn off buffering of STDOUT, so status is printed immediately
select $previously_selected;
my $apache_url_suffix = "lucene/java/$version/lucene-$version.zip.asc";
my $maven_url = "http://repo1.maven.org/maven2/org/apache/lucene/lucene-core/$version/lucene-core-$version.pom.asc";
my $maven_available = 0;
my @apache_mirrors = ();
if (defined($apache_mirrors_list_page)) {
#<TR>
# <TD ALIGN=RIGHT><A HREF="http://apache.dattatec.com/">apache.dattatec.com</A> <A HREF="http://apache.dattatec.com/">@</A></TD>
#
# <TD>http</TD>
# <TD>ok</TD>
#</TR>
my $mirror_entry = $1;
my $mirror_url = $1;
push @apache_mirrors, "$mirror_url/$apache_url_suffix";
}
}
} else {
print STDERR "Error fetching Apache mirrors list $apache_mirrors_list_url";
exit(1);
}
my $num_apache_mirrors = $#apache_mirrors;
my $sleep_interval = 0;
while (1) {
print "\nPolling $#apache_mirrors Apache Mirrors";
print " and Maven Central" unless ($maven_available);
print "...\n";
my $start = time();
unless ($maven_available);
my $stop = time();
"downloadable from Maven Central.\n";
printf "$version is downloadable from %d/%d Apache Mirrors (%0.1f%%)\n",
if ($sleep_interval > 0) {
print "Sleeping for $sleep_interval seconds...\n";
sleep($sleep_interval)
}
}
sub check_mirrors {
for my $mirror (@apache_mirrors) {
print ".";
}
print "\n";
return @not_yet_downloadable_apache_mirrors;
}