From 2c57c49cc39e8e7250495d4d7ce713ba06272a46 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 2 Sep 2007 09:38:39 +0200 Subject: bootstrap: uses rsync to download the .po files * bootstrap (po_download_command_format): New global. (download_po_files): Use rsync. (update_po_files): Don't remove .po files after download, so future rsync runs can take advantage of the copies. --- bootstrap | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 42f0fad2a..39c6971a2 100755 --- a/bootstrap +++ b/bootstrap @@ -70,9 +70,13 @@ gnulib_modules= # Any gnulib files needed that are not in modules. gnulib_files= -# Translation Project URL, for the registry of all projects -# and for the translation-team master directory. -TP_URL="http://translationproject.org/latest/" +# The command to download all .po files for a specified domain into +# a specified directory. Fill in the first %s is the domain name, and +# the second with the destination directory. Use rsync's -L and -r +# options because the latest/%s directory and the .po files within are +# all symlinks. +po_download_command_format=\ +"rsync -Lrtvz 'translationproject.org::tp/latest/%s/' '%s'" extract_package_name=' /^AC_INIT(/{ @@ -255,17 +259,9 @@ gnulib_tool=$GNULIB_SRCDIR/gnulib-tool download_po_files() { subdir=$1 domain=$2 - - case $WGET_COMMAND in - '') - echo "$0: wget not available; skipping translations";; - ?*) - echo "$0: getting translations into $subdir for $domain..." && - - (cd $subdir && rm -f dummy `ls | sed -n '/\.po/p'` && - $WGET_COMMAND -r -l1 -nd -np -A.po $TP_URL/$domain) - ;; - esac + echo "$0: getting translations into $subdir for $domain..." + cmd=`printf "$po_download_command_format" "$domain" "$subdir"` + eval "$cmd" } # Download .po files to $po_dir/.reference and copy only the new @@ -292,7 +288,6 @@ update_po_files() { echo "updated $po_dir/$po.po..." cp "$new_po" "$po_dir/$po.po" && sha1sum < "$new_po" > "$cksum_file" fi - rm -f "$new_po" done } -- cgit v1.2.3-54-g00ecf