[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/4] maint.mk: Update translations using rsync instead of wget.
From: |
Martin von Gagern |
Subject: |
[PATCH 3/4] maint.mk: Update translations using rsync instead of wget. |
Date: |
Thu, 21 Jan 2010 15:39:49 +0100 |
Checksums (-c) are used instead of timestamps (-t) to check whether a file
is already up to date. This allows integration with version control systems
that usually don't preserve timestamps. The listing of files was changed
from verbose (-v) to itemize (-i) so it becomes easier to distinguish
updated files from new ones.
See also http://translationproject.org/html/maintainers.html
---
top/maint.mk | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/top/maint.mk b/top/maint.mk
index 2a90932..438d3ab 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -848,12 +848,16 @@ coverage: init-coverage build-coverage gen-coverage
# Update gettext files.
PACKAGE ?= $(shell basename $(PWD))
PO_DOMAIN ?= $(PACKAGE)
-POURL = http://translationproject.org/latest/$(PO_DOMAIN)/
PODIR ?= po
+RSYNC_OPTIONS = -iz
+RSYNC_PROTECT ?= address@hidden address@hidden
+.PHONY: refresh-po
refresh-po:
- rm -f $(PODIR)/*.po && \
- echo "$(ME): getting translations into po (please ignore the robots.txt
ERROR 404)..." && \
- wget --no-verbose --directory-prefix $(PODIR) --no-directories
--recursive --level 1 --accept .po --accept .po.1 $(POURL) && \
+ @echo "$(ME): getting translations into $(PODIR)..."
+ rsync $(RSYNC_OPTIONS) -Lrc --delete \
+ $(patsubst %,-f 'protect %',$(RSYNC_PROTECT)) \
+ -f 'include *.po' -f 'exclude *' \
+ translationproject.org::tp/latest/$(PO_DOMAIN)/ $(PODIR)
echo 'address@hidden' > $(PODIR)/LINGUAS && \
echo 'address@hidden' >> $(PODIR)/LINGUAS && \
ls $(PODIR)/*.po | sed 's/\.po//' | sed 's,$(PODIR)/,,' | sort >>
$(PODIR)/LINGUAS
--
1.6.6
Re: Improvements for maint.mk, Eric Blake, 2010/01/21
Re: maintainer-makefile troubles and suggestions, Eric Blake, 2010/01/21
Re: maintainer-makefile troubles and suggestions, Bruno Haible, 2010/01/31