changeset 16170:1d56717b2688

build: let bootstrap resort to wget for downloading .po files * build-aux/bootstrap (download_po_files): Fallback to wget when downloading the .po files via rsync failed. This is necessary to bootstrap behind a strict firewall.
author Bernhard Voelker <mail@bernhard-voelker.de>
date Mon, 05 Sep 2011 13:28:20 +0200
parents 950bf7d3d1ee
children a44fe2e12042
files ChangeLog build-aux/bootstrap
diffstat 2 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-12-17  Bernhard Voelker  <mail@bernhard-voelker.de>
+
+	build: let bootstrap resort to wget when downloading .po files
+	* build-aux/bootstrap (download_po_files): Fallback to wget when
+	downloading the .po files via rsync fails.  This is necessary to
+	bootstrap from behind a strict firewall.
+
 2011-12-15  Paul Eggert  <eggert@cs.ucla.edu>
 
 	stdint: don't assume C++11 when compiling with g++
--- a/build-aux/bootstrap
+++ b/build-aux/bootstrap
@@ -105,6 +105,11 @@
 "rsync --delete --exclude '*.s1' -Lrtvz \
  'translationproject.org::tp/latest/%s/' '%s'"
 
+# Fallback for downloading .po files (if rsync fails).
+po_download_command_format2=\
+"wget --mirror -nd -q -np -A.po -P '%s' \
+ http://translationproject.org/latest/%s/"
+
 extract_package_name='
   /^AC_INIT(/{
      /.*,.*,.*, */{
@@ -603,6 +608,9 @@
   domain=$2
   echo "$me: getting translations into $subdir for $domain..."
   cmd=`printf "$po_download_command_format" "$domain" "$subdir"`
+  eval "$cmd" && return
+  # Fallback to HTTP.
+  cmd=`printf "$po_download_command_format2" "$subdir" "$domain"`
   eval "$cmd"
 }