On 07.04.2014 18:40, Laurent Bercot wrote:

The first changes /bin/sh to /bin/bash so that "echo -n" works as
intended (with /bin/sh, the "-n" is not interpreted as an argument).

Do you mean it's interpreted literally instead of as an option ?
I'd rather not depend on bash for the build.

Yes, for example:

  $ /bin/sh --version
  GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin12)

  $ /bin/sh -c 'echo -n hello'
  -n hello

  $ /bin/bash -c 'echo -n hello'
  hello

On a Linux machine with Bash 4, the "-n" does suppress newline,
even when invoked as /bin/sh, so not sure if it's a Bash 3 vs. 4
thing, or an OS X oddity.

For what it's worth, I'm using nix [1] to build s6, and it provides
an easy way to apply patches at build time, so it's not a big deal for me. I'll leave it to you if you want to change it to 'printf' or leave it as is.

[1] http://nixos.org/nix/

Things only break when flag-allstatic is absent, i.e. you're trying to
build shared libraries.

Ah, thank you. I'm not actually using the shared libraries (building execline
and s6 with flag-allstatic), so I will try that route for skalibs.

--
Patrick Mahoney

Reply via email to