summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2007-09-02 09:38:39 +0200
committerJim Meyering <jim@meyering.net>2007-09-02 09:38:50 +0200
commit2c57c49cc39e8e7250495d4d7ce713ba06272a46 (patch)
treef790cd9fe3ab445ccade223c8d47ad4a4b4ce6d1 /bootstrap
parent5fabec7fb6b21b4c86e00d1a69f73d236c1f2991 (diff)
downloadcoreutils-2c57c49cc39e8e7250495d4d7ce713ba06272a46.tar.xz
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.
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap25
1 files changed, 10 insertions, 15 deletions
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
}