-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] Replace Bash with basic Bourne compatible shell for portability. #100
Comments
It looks like the majority of scripts can be fixed by simply (case-sensitively) grepping for "bash" in the project and replacing each instances with "sh" using your favorite editor. I don't recommend using sed to do it; some files contain instances of the string "bash" that may be important. There are some cases where just changing the shebang line of a script is not sufficient. It may be worthwhile for now to leave everything under Of course, many scripts under I don't know of a shell-portable way to declare arrays -- not even just for Bourne-syntax shells like Z Shell, Korne Shell, and Bash (let alone C Shell syntax). I noticed that both
Doing that reveals some other compatbility issues arising from In There are other files I have not checked that contain the string "bash". It might be worthwhile to go through the list of results produced by:
I hope this helps. |
I am also a fan of POSIX @mertyildiran I think this is a good idea as, already put, it allows for greater portability. Will most of our users have Bash installed? Probably. But some won't, and this will inherently exclude BSD users. Also, there is a new rise of Unix-like operating systems that provide By tackling this now, we can quash any portability issues and create a greater surface area for attracting new users. For the last two years I have only been writing POSIX |
The
/bin/bash
path in the build system is not fully portable. Some OSes (e.g. BSD Unix systems and some Linux-based systems) do not have Bash installed by default, and when installed from packages (or even on some systems with Bash installed by default) the Bash executable path is not in/bin
. For increased portability and reduced dependency requirements, while remaining compatible with Linux distributions that use Bash as the default system shell, I recommend using a basic Bourne compatible shell with the path/bin/sh
instead.The following is a quote about this matter from issue #97 :
Keeping Bash while porting Chaos to new OSes (e.g. BSD Unix systems) may require programmatically determining the Bash executable path rather than hardcoding it and adding dependency handling for Bash installation in build configuration steps.
The text was updated successfully, but these errors were encountered: