changeset 9187:9d2d1cd46644

Prefer rsync over wget when available.
author Bruno Haible <bruno@clisp.org>
date Sat, 08 Sep 2007 23:07:48 +0000
parents 2fc0bd767d53
children 7bf3aff81ae2
files ChangeLog gnulib-tool
diffstat 2 files changed, 20 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Sep 08 22:45:08 2007 +0000
+++ b/ChangeLog	Sat Sep 08 23:07:48 2007 +0000
@@ -1,3 +1,13 @@
+2007-09-08  Bruno Haible  <bruno@clisp.org>
+
+	* gnulib-tool (func_import): Prefer rsync over wget when available,
+	for fetching the PO files.
+
+2007-09-08  Bruno Haible  <bruno@clisp.org>
+
+	* posix-modules: New file. Portions copied from gnulib-tool.
+	* doc/gnulib.texi (POSIX Substitutes Library): New chapter.
+
 2007-09-08  Jim Meyering  <jim@meyering.net>
 
 	Rename __fpending.c -> fpending.c and __fpending.h -> fpending.h
--- a/gnulib-tool	Sat Sep 08 22:45:08 2007 +0000
+++ b/gnulib-tool	Sat Sep 08 23:07:48 2007 +0000
@@ -22,7 +22,7 @@
 
 progname=$0
 package=gnulib
-cvsdatestamp='$Date: 2007-08-26 10:36:54 $'
+cvsdatestamp='$Date: 2007-09-08 23:07:48 $'
 last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
 version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
 nl='
@@ -2497,10 +2497,18 @@
     fi
     # Fetch PO files.
     TP_URL="http://translationproject.org/latest/"
+    TP_RSYNC_URI="translationproject.org::tp/latest/"
     if $doit; then
       echo "Fetching gnulib PO files from $TP_URL"
       (cd "$destdir"/$pobase \
-       && wget --quiet -r -l1 -nd -np -A.po "${TP_URL}gnulib"
+       && { # 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 --quiet -r -l1 -nd -np -A.po "${TP_URL}gnulib"
+            fi
+          }
       )
     else
       echo "Fetch gnulib PO files from $TP_URL"