guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[shepherd] 02/04: maint: Add 'download-po-files' target.


From: Ludovic Courtès
Subject: [shepherd] 02/04: maint: Add 'download-po-files' target.
Date: Wed, 6 Apr 2022 16:25:57 -0400 (EDT)

civodul pushed a commit to branch master
in repository shepherd.

commit f56f11810ec9384104ba78ece75a37b5ffac133d
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Apr 6 22:19:40 2022 +0200

    maint: Add 'download-po-files' target.
    
    * Makefile.am (download-po-files): New target.
---
 Makefile.am | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 8717dfc..b3a6b8e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -150,6 +150,20 @@ install-exec-hook: install-executable-symlinks 
install-crash-handler
                 -i $$script ;                                          \
        done
 
+# Download PO files (translations).
+download-po-files:
+       for lang in `grep -v '^[[:blank:]]*#' < "$(top_srcdir)/po/LINGUAS"`; do 
\
+         if wget -nv -O "$(top_srcdir)/po/$$lang.po.tmp"                       
\
+           "https://translationproject.org/latest/shepherd/$$lang.po"; ;        
\
+         then                                                                  
\
+           mv "$(top_srcdir)/po/$$lang.po"{.tmp,} ;                            
\
+         else                                                                  
\
+           rm "$(top_srcdir)/po/$$lang.po.tmp" ;                               
\
+         fi ;                                                                  
\
+       done
+
+.PHONY: download-po-files
+
 # Install 'shutdown' as a symlink to 'halt; XXX: someday we'll do
 # better.
 install-executable-symlinks:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]