[PKG-IRC-Maintainers] Bug#471287: Bug#471287: FIX: atheme-services: bashism in /bin/sh script
Giacomo A. Catenazzi
cate at debian.org
Tue Apr 29 12:21:13 UTC 2008
> Here is one patch to solve the bashism in this package.
No, the patch is wrong!
BTW "-n" is not a bashism, but a long time convention starting
from the *BSD, IIRC, and cited also on POSIX.
: A string to be written to standard output. If the first
: operand is -n, or if any of the operands contain a
: backslash ( '\' ) character, the results are implementation-defined.
so also your methods is not portable on all POSIX systems, as
: It is not possible to use echo portably across all
: POSIX systems unless both -n (as the first argument)
: and escape sequences are omitted.
You should use printf instead of '-n' and '\c',
to be mroe portable.
Your patch works well on XSI-conformant systems, but
Debian, nor Linux are so far. (I think that POSIX
would conform to Linux and not the contrary on thi
field, but not yet checked the future posix).
Anyway, your Debian policy manual allows (ad uses)
the "echo -n" convention.
( http://www.debian.org/doc/debian-policy/ch-opersys.html }
More information about the Pkg-irc-maintainers