diff options
author | Mathieu Anquetin <mathieu@anquetin.eu> | 2014-09-04 08:54:48 +0200 |
---|---|---|
committer | Ben Pfaff <blp@cs.stanford.edu> | 2014-09-05 17:17:24 -0700 |
commit | c83b8970990405a5f97da2870c408ea67520afec (patch) | |
tree | f1164cd4a32edb8a8bd95de0300d69c6158f744e /gnulib-tool | |
parent | 5be8d47e025293fc079ba15cd6a3f7a0a6f5790c (diff) | |
download | gnulib-c83b8970990405a5f97da2870c408ea67520afec.tar.gz |
gnulib-tool: Fallback to wget when rsync fails
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 <mathieu@anquetin.eu>
Diffstat (limited to 'gnulib-tool')
-rwxr-xr-x | gnulib-tool | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gnulib-tool b/gnulib-tool index 73539204b8..5031041ad2 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 |