summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2017-04-24 19:44:03 +0100
committerTim-Philipp Müller <tim@centricular.com>2017-04-24 19:44:03 +0100
commit140d073c89f6998733653dd1d8bde86e5d46f0f7 (patch)
treeaa46fa6ff6652e054ba5d7119bd927b849bfe4f6
parent79d47d47ee8ed6307a1a52da06d0b8aaf926fc43 (diff)
po.mak: download-po: run some clean-up after downloading latest files
We're only interested in updates that update the actual translations, so ignore changes that just update the date.
-rw-r--r--po.mak7
1 files changed, 7 insertions, 0 deletions
diff --git a/po.mak b/po.mak
index e019fac..8d073b7 100644
--- a/po.mak
+++ b/po.mak
@@ -1,4 +1,11 @@
# rule to download the latest .po files
download-po: $(top_srcdir)/common/download-translations
$(top_srcdir)/common/download-translations $(PACKAGE)
+ for f in *.po; do \
+ num_changed=`git diff $f | grep -e '^[+-][^+-]' | wc -l`; \
+ num_date=`git diff $f | grep -e '^[+-][^+-]' | grep POT-Creation-Date | wc -l`; \
+ if [ $num_date == $num_changed ]; then \
+ git checkout $f; \
+ fi; \
+ done