]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
po: Make the insertion of the .pot-header file more robust.
authorBruno Haible <bruno@clisp.org>
Tue, 23 Oct 2018 22:22:37 +0000 (00:22 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Oct 2018 22:22:37 +0000 (00:22 +0200)
This improves on the 2015-09-01 patch.

* gettext-runtime/po/Makefile.in.in ($(DOMAIN).pot-update): Fail if the 'cat'
command fails.

gettext-runtime/po/Makefile.in.in

index 19b0dbbf8ef04edc627e58fca05ac005cb019937..49140f4901fe68346de0179d694e32b533f8a389 100644 (file)
@@ -203,8 +203,9 @@ $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
        test ! -f $(DOMAIN).po || { \
          if test -f $(srcdir)/$(DOMAIN).pot-header; then \
            sed -e '1,/^#$$/d' < $(DOMAIN).po > $(DOMAIN).1po && \
-           cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po; \
-           rm -f $(DOMAIN).1po; \
+           cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po && \
+           rm -f $(DOMAIN).1po \
+           || exit 1; \
          fi; \
          if test -f $(srcdir)/$(DOMAIN).pot; then \
            sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \