From: Bruno Haible Date: Sun, 24 May 2026 00:31:22 +0000 (+0200) Subject: examples: Fix an unportable use of 'echo'. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e7e6e91fa63f76b911301858498ea42dec014a7f;p=thirdparty%2Fgettext.git examples: Fix an unportable use of 'echo'. Reported by Santiago Vila in . * gettext-tools/examples/hello-c++-kde/admin/cvs.sh: Use printf instead of 'echo -e'. --- diff --git a/gettext-tools/examples/hello-c++-kde/admin/cvs.sh b/gettext-tools/examples/hello-c++-kde/admin/cvs.sh index a39fddd7c..89887a9f5 100644 --- a/gettext-tools/examples/hello-c++-kde/admin/cvs.sh +++ b/gettext-tools/examples/hello-c++-kde/admin/cvs.sh @@ -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 () { 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