From: Bruno Haible Date: Tue, 23 Oct 2018 22:22:37 +0000 (+0200) Subject: po: Make the insertion of the .pot-header file more robust. X-Git-Tag: v0.20~297 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5b2c6429ce33a3e9e39a8a7637e8a7768f6d70eb;p=thirdparty%2Fgettext.git po: Make the insertion of the .pot-header file more robust. This improves on the 2015-09-01 patch. * gettext-runtime/po/Makefile.in.in ($(DOMAIN).pot-update): Fail if the 'cat' command fails. --- diff --git a/gettext-runtime/po/Makefile.in.in b/gettext-runtime/po/Makefile.in.in index 19b0dbbf8..49140f490 100644 --- a/gettext-runtime/po/Makefile.in.in +++ b/gettext-runtime/po/Makefile.in.in @@ -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 && \