Skip to content
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

make Bash scripts more portable by using #!/usr/bin/env bash as the "shebang" #2

Closed
wants to merge 1 commit into from

Conversation

das-g
Copy link

@das-g das-g commented Feb 10, 2021

Make Bash scripts more portable by using #!/usr/bin/env bash as the "shebang", as not all systems that have Bash place it at /bin/bash. (E.g., /bin/bash won't work out-of-the-box on NixOS.)

See this answer to "What is the preferred Bash shebang?" and note that your existing ./gradlew already leads by example:

#!/usr/bin/env bash

Description

Replace #!/bin/bash with #!/usr/bin/env bash for all three Bash scripts in ./scripts/

Checklist

  • I've signed the Contributor License Agreement
  • All changes in this pull request were created made by me, I own the full copyright for all these changes
  • These changes are sufficiently non-trivial to warrant copyright protection (IANAL;TINLA)
  • nos esse quasi nanos gigantum humeris insidentes

by using `#!/usr/bin/env bash` as the "shebang",
as not all systems that have Bash place it at `/bin/bash`.

See https://stackoverflow.com/a/10383546/674064
@threema-fabian threema-fabian self-assigned this Feb 10, 2021
@threema-fabian
Copy link

Thanks for your contribution @das-g! The /usr/bin/env bash "shebang" change you suggest was already integrated into our internal codebase recently, and will be published with the next release.

Best, Fabian

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

Successfully merging this pull request may close these issues.

2 participants