po-update rule: use wget rather than rsync
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 5 Sep 2020 03:08:12 +0000 (05:08 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 5 Sep 2020 03:39:47 +0000 (05:39 +0200)
Rsync is considered insecure these days

po/automake.mk

index 2f169f338fe6ce3971e90f502a96a1170e237247..594d35e14ffd51880dd2e7ece0898fe17b474bbc 100644 (file)
@@ -123,6 +123,15 @@ po_CLEAN:
        fi
 CLEAN_LOCAL += po_CLEAN
 
-RSYNC = rsync
-po-update:
-       $(RSYNC) -Lrtvz translationproject.org::tp/latest/pspp/ $(srcdir)/po
+# Download the po files from http://translationproject.org
+# The final action to this rule is to remove the .pot file.  This
+# is because the po files must be re-merged against an updated version of it.
+.PHONY: po-update
+po-update: $(POFILES)
+       for p in $^; do \
+               wget --recursive --level=1 --accept=po --no-directories --no-use-server-timestamps \
+               --directory-prefix=po -O ${top_srcdir}/$$p,tmp \
+               https://translationproject.org/latest/pspp/`basename $$p` ; \
+               mv ${top_srcdir}/$$p,tmp ${top_srcdir}/$$p; \
+       done
+       $(RM) $(POTFILE)