Skip to content

Change shebang for greater portability #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

Open
Jekotia opened this issue May 3, 2025 · 0 comments
Open

Change shebang for greater portability #18

Jekotia opened this issue May 3, 2025 · 0 comments

Comments

@Jekotia
Copy link
Contributor

Jekotia commented May 3, 2025

I'm currently trialing nixos, and have encountered a script portability problem: the shebang being used in this project will not resolve to a sh binary because sh isn't present at the assumed path /bin/sh.

Researching shebangs and portability, I have found that #! /usr/bin/env sh is considered to be the most portable. In basic terms, this shebang uses /usr/bin/env to check the locations in the $PATH variable for sh. This means that, so long as sh is available in a users' $PATH, it will find and run the correct binary.

I was going to fork and make a pull request, but I imagine that a pull request touching every single script in this repository is likely to cause problems with other dev's working trees when they try and merge their changes, hence this being raised as an issue instead. If I am mistaken, I will happily fork and create a pull request for this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant