[Slackbuilds-users] bashisms?

Andrzej Telszewski atelszewski at gmail.com
Wed Sep 2 13:52:30 UTC 2015


Hi,

Today I was writing code to execute script from C code and I'd like to 
share with you what I've found. It stroke me, but should otherwise be 
obvious.

It seems that shebang has only meaning if the script is invoked 
directly, that is:
$ ./whatever.SlackBuild
or
$ sh -c ./whatever.SlackBuild

otherwise, shebang is nothing more than a comment...

If you run your script through sh (which links to bash), it doesn't 
matter what the shebang is, it can be #!/bin/csh, and the script is 
still going to be interpreted by sh.

This might be important, as sbopkg uses sh to execute the build.

-- 
Best regards,
Andrzej Telszewski


More information about the SlackBuilds-users mailing list