-
Notifications
You must be signed in to change notification settings - Fork 96
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
Enhancement: Write bpkg in terms of POSIX sh #90
Comments
@mcandre i love that idea! we'd happily accept a PR |
:) As a prototype, I pushed https://github.com/mcandre/shaggy . Functionality is rather basic, but it shows what is possible with pure POSIX sh, and what the syntax looks like. Also features an example of checkbashisms, a linter that helps to warn on the presence of bash-specific code, for projects where you want to distinguish between bash and POSIX sh code. |
@mcandre very nice :] |
If the workload to make Just a thought but would it be useful to use BASH POSIX mode (with Similar to Obligatory links to https://wiki.ubuntu.com/DashAsBinSh and http://mywiki.wooledge.org/Bashism after mention of POSIX portability and bashisms |
@Potherca sounds good to me. we'd happily accept a PR! |
In general, porting Bash shell code to POSIX-compliant shell code negatively impacts performance. Bash has more features under variable expansion and flags to builtins that would otherwise require costly subshells or running external programs. We do have some documented performance issues at #129, so I'm not sure this is the right way to go usability and performance-wise. So in my opinion, I'm inclined to close this issue. Not sure what else has changed since 2017. |
As per #122 I would rather spend energy on stability (i.e. tests) and usability (docs, installation, publishing) before moving on to portability. |
@Potherca, I currently have a significant number of tests that I've created for a large amount of the project (using shUnit2). Sadly got a denser workload right now, so had to put it on pause. |
bpkg is amazing, would be great for managing zsh and ksh scripts as well! What do you think of writing bpkg's internals in terms of POSIX sh, so that bash isn't actually required for bpkg?
For example,
[[ -f "$CONFIG_FILE" ]]
could be accomplished withtest -f "$CONFIG_FILE"
The text was updated successfully, but these errors were encountered: