bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] gnulib-tool: Fallback to wget when rsync fails


From: Mathieu Anquetin
Subject: [PATCH] gnulib-tool: Fallback to wget when rsync fails
Date: Tue, 2 Sep 2014 12:22:54 +0200

Current implementation only tries to rsync PO files when rsync is
installed on the host. In case of error, no files are downloaded even
if they are available. This leads to bootstrap problems for hosts
that lie behind a restrictive firewall.

This patch always tries to rsync by default, falling back to wget if
an error occurs.

Signed-off-by: Mathieu Anquetin <address@hidden>
---
 gnulib-tool |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gnulib-tool b/gnulib-tool
index 7353920..5031041 100755
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -5029,10 +5029,10 @@ s,//*$,/,'
        && { # Prefer rsync over wget if it is available, since it consumes
             # less network bandwidth, due to compression.
             if type rsync 2>/dev/null | grep / > /dev/null; then
-              rsync -Lrtz "${TP_RSYNC_URI}gnulib/" .
-            else
-              wget --no-verbose -r -l1 -nd -np -A.po "${TP_URL}gnulib/"
+              rsync -Lrtz "${TP_RSYNC_URI}gnulib/" . && return
             fi
+
+            wget --no-verbose -r -l1 -nd -np -A.po "${TP_URL}gnulib/"
           }
       )
     else
-- 
1.7.10.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]