From: Bruno Haible Date: Sat, 8 Sep 2007 23:07:48 +0000 (+0000) Subject: Prefer rsync over wget when available. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6909aca5f91a823cbb38a7fdff404d8f0e5effb4;p=pspp Prefer rsync over wget when available. --- diff --git a/ChangeLog b/ChangeLog index 6b623933ab..c06bf269c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2007-09-08 Bruno Haible + + * gnulib-tool (func_import): Prefer rsync over wget when available, + for fetching the PO files. + +2007-09-08 Bruno Haible + + * posix-modules: New file. Portions copied from gnulib-tool. + * doc/gnulib.texi (POSIX Substitutes Library): New chapter. + 2007-09-08 Jim Meyering Rename __fpending.c -> fpending.c and __fpending.h -> fpending.h diff --git a/gnulib-tool b/gnulib-tool index 2ea257dba6..7878664430 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -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"