summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Voelker <mail@bernhard-voelker.de>2011-09-05 13:28:20 +0200
committerJim Meyering <meyering@redhat.com>2011-10-06 09:05:26 +0200
commit43a987e1797d25a507f99603b59f6cf3cdb0a03f (patch)
treefa3ff50aff9a9ef6ce509358f4555f4204bdb28f
parente1fc300b599a3039e477576df0781896c8b952bd (diff)
downloadcoreutils-43a987e1797d25a507f99603b59f6cf3cdb0a03f.tar.xz
build: let bootstrap resort to wget for downloading .po files
* bootstrap (download_po_files): Fallback to wget when downloading the .po files via rsync failed. This is necessary to bootstrap behind a strict firewall.
-rwxr-xr-xbootstrap8
1 files changed, 8 insertions, 0 deletions
diff --git a/bootstrap b/bootstrap
index f76db9aea..d165a2edb 100755
--- 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"
}