Jim.Diamond at acadiau.ca
Fri Aug 28 11:25:55 UTC 2015
On Thu, Aug 27, 2015 at 21:28 (+0200), Didier Spaier wrote:
> On 27/08/2015 18:45, B Watson wrote:
>> Are we supposed to be avoiding bashisms?
> I don't know, but I tend to.
> We can't rule out that a folk running a SlackBuild have symlinked /bin/sh
> to /bin/ash, and replaced the #!/bin/sh shebang by #!/bin/bash in scripts
> that must run on bash (or even modified some Slackware scripts so that
> they run on a fully POSIX compliant shell. I seem to remember that
> someone have reported having done that on LQ).
> Else we should make very clear that /bin/sh must be a symlink to /bin/bash.
I don't think that that should be a requirement. If some day Pat
decides to use a faster, POSIX-complaint shell for /bin/sh, then there
might be lots of breakage in SBo-land This can easily be prevented
with a small bit of defensive programming (i.e., writing one's script
to avoid bash-isms if that can be done "easily", and otherwise following
good programming practices by explicitly declaring that the shell
script must be run by bash if that is, indeed, the case).
More information about the SlackBuilds-users