[PATCH 2/2] ldd: Don't use Bash-only $"msgid" quoting

Dmitry V. Levin ldv@altlinux.org
Sat Nov 24 21:30:00 GMT 2012


On Sat, Nov 24, 2012 at 02:34:31AM +0400, Dmitry V. Levin wrote:
> Not exactly that way because gettext without arguments exits with a
> non-zero status.  I'd rather use a lazy evaluation, e.g.

No, a lazy evaluation wouldn't work properly because the wrapper is going
to be called in subshells.  So it could be something more simple, e.g.

if TEXTDOMAIN=libc TEXTDOMAINDIR=@TEXTDOMAINDIR@ gettext '' >/dev/null 2>&1; then
	a_wrapper_function_that_calls_gettext ()
	{
		TEXTDOMAIN=libc TEXTDOMAINDIR=@TEXTDOMAINDIR@ gettext "$1"
	}
else
	a_wrapper_function_that_calls_gettext ()
	{
		printf %s "$1"
	}
fi


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20121124/3bbb1f64/attachment.sig>


More information about the Libc-alpha mailing list