Prefer rsync over wget when available.
authorBruno Haible <bruno@clisp.org>
Sat, 8 Sep 2007 23:07:48 +0000 (23:07 +0000)
committerBruno Haible <bruno@clisp.org>
Sat, 8 Sep 2007 23:07:48 +0000 (23:07 +0000)
ChangeLog
gnulib-tool

index 6b623933ab49e456724a3c78fc794b8c5ee729a7..c06bf269c6c4f34e806d7297ef6375ff87032784 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 2ea257dba6093b6eac97cdffcf7412ce2e766698..787866443014c0e63d6344d299c5cc96339c20af 100755 (executable)
@@ -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 @@ func_import ()
     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"