+2007-09-02 Jim Meyering <jim@meyering.net>
+
+ 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.
+
2007-09-01 Jim Meyering <jim@meyering.net>
* bootstrap (gnulib_tool): Make sha1sum check quietly.
# 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(/{
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
echo "updated $po_dir/$po.po..."
cp "$new_po" "$po_dir/$po.po" && sha1sum < "$new_po" > "$cksum_file"
fi
- rm -f "$new_po"
done
}