]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
examples: Fix an unportable use of 'echo'. master
authorBruno Haible <bruno@clisp.org>
Sun, 24 May 2026 00:31:22 +0000 (02:31 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 24 May 2026 00:31:22 +0000 (02:31 +0200)
Reported by Santiago Vila <sanvila@debian.org> in
<https://lists.gnu.org/archive/html/bug-gettext/2026-05/msg00027.html>.

* gettext-tools/examples/hello-c++-kde/admin/cvs.sh: Use printf instead of
'echo -e'.

gettext-tools/examples/hello-c++-kde/admin/cvs.sh

index a39fddd7c05914a8208ba5551adfa407ff3a90c5..89887a9f5728dcf34908afcf14e89bde48805776 100644 (file)
@@ -423,7 +423,10 @@ for subdir in $dirs; do
        fi
    fi
    if test -n "`grep -r KAboutData *.c* *.C* 2>/dev/null`"; then
-       echo -e 'i18n("_: NAME OF TRANSLATORS\\n"\n"Your names")\ni18n("_: EMAIL OF TRANSLATORS\\n"\n"Your emails")' > _translatorinfo.cpp
+       printf '%s\n%s\n%s\n%s\n' \
+              'i18n("_: NAME OF TRANSLATORS\n"' '"Your names")' \
+              'i18n("_: EMAIL OF TRANSLATORS\n"' '"Your emails")' \
+              > _translatorinfo.cpp
    else echo " " > _translatorinfo.cpp
    fi
    perl -e '$mes=0; while (<STDIN>) { next if (/^(if|else|endif)\s/); if (/^messages:/) { $mes=1; print $_; next; } if ($mes) { if (/$\\(XGETTEXT\)/ && / -o/) { s/ -o \$\(podir\)/ _translatorinfo.cpp -o \$\(podir\)/ } print $_; } else { print $_; } }' < Makefile.am | egrep -v '^include ' > _transMakefile