]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
build: let bootstrap resort to wget for downloading .po files
authorBernhard Voelker <mail@bernhard-voelker.de>
Mon, 5 Sep 2011 11:28:20 +0000 (13:28 +0200)
committerJim Meyering <meyering@redhat.com>
Thu, 6 Oct 2011 07:05:26 +0000 (09:05 +0200)
* bootstrap (download_po_files): Fallback to wget when downloading
the .po files via rsync failed.  This is necessary to bootstrap behind
a strict firewall.

bootstrap

index f76db9aea21aa1dad40eebe4f33401e10b382c87..d165a2edbec466aad42ff6a04bc10108ea8872c9 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -105,6 +105,11 @@ po_download_command_format=\
 "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(/{
      /.*,.*,.*, */{
@@ -583,6 +588,9 @@ download_po_files() {
   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"
 }