fallback to curl if wget doesn't work/isn't there

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene_solr_3_3@1139775 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lucene/src/site/changes/changes2html.pl b/lucene/src/site/changes/changes2html.pl
index dd55f84..de1359c 100755
--- a/lucene/src/site/changes/changes2html.pl
+++ b/lucene/src/site/changes/changes2html.pl
@@ -674,7 +674,8 @@
            '2.9.0' => '2009-09-23',     '2.9.1' => '2009-11-06',
            '3.0.0' => '2009-11-25');
 
-  my $project_info_json = `wget --no-check-certificate -O - $project_info_url`;
+  my $project_info_json = get_url_contents($project_info_url);
+  
   my $project_info = json2perl($project_info_json);
   for my $version (@{$project_info->{versions}}) {
     if ($version->{releaseDate}) {
@@ -690,6 +691,21 @@
   return %release_dates;
 }
 
+#
+# returns contents of the passed in url
+#
+sub get_url_contents {
+  my $url = shift;
+  my $tryWget = `wget --no-check-certificate -O - $url`;
+  if ($? eq 0) {
+    return $tryWget;
+  }
+  my $tryCurl = `curl $url`;
+  if ($? eq 0) {
+    return $tryCurl;
+  }
+  die "could not retrieve $url with either wget or curl!";
+}
 
 #
 # setup_month_regex