]> git.ipfire.org Git - thirdparty/gettext.git/commit
xgettext: Recognize 'env' and assignments in Shell scripts.
authorBruno Haible <bruno@clisp.org>
Mon, 16 Sep 2019 00:47:44 +0000 (02:47 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 16 Sep 2019 00:47:44 +0000 (02:47 +0200)
commit63587292db018bf10d9ab9ca9d63dc9ee8cabfc8
treeed2f1aa7715639d5758a3d2465e47432313b29a0
parent24566c3387a6b8b4f21312c90a1da522b4714009
xgettext: Recognize 'env' and assignments in Shell scripts.

Reported by Jason Vas Dias <jason.vas.dias@gmail.com>
in <https://lists.gnu.org/archive/html/bug-gettext/2019-08/msg00032.html>.

* gettext-tools/src/x-sh.c (enum word_type): Add t_assignment.
(read_word): Recognize assignments.
(read_command): In a function position, ignore assignments and 'env' tokens.
* gettext-tools/tests/xgettext-sh-7: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add it.
* NEWS: Mention the change.
NEWS
gettext-tools/src/x-sh.c
gettext-tools/tests/Makefile.am
gettext-tools/tests/xgettext-sh-7 [new file with mode: 0755]