Skip to content

Conversation

@asomers
Copy link
Contributor

@asomers asomers commented Jul 27, 2017

/bin/bash is a Linuxism. /bin/sh is portable, and this script isn't
using any bash-specific features.

/bin/bash is a Linuxism.  /bin/sh is portable, and this script isn't
using any bash-specific features.
@anadon
Copy link
Contributor

anadon commented Aug 31, 2018

I'm helping out with the PR backlog. BSD, Linux, Mac, and now Windows have bash support. Why is this change needed? This will be in the first batch of merged PR's. This is to let you know and help me prioritize PR's.

@asomers
Copy link
Contributor Author

asomers commented Aug 31, 2018

Because while bash can run almost everywhere, it isn't necessarily installed by default, and on many systems /bin/bash isn't the correct path. /bin/sh is correct on every unix system.

@anadon
Copy link
Contributor

anadon commented Aug 31, 2018

Could you provide an example? I'd like a concrete need in order to immediately accept this.

@asomers
Copy link
Contributor Author

asomers commented Aug 31, 2018

On the BSDs, bash is usually installed to /usr/local/bin/bash, and is not installed by default. On OSX, it can vary based on whether you're using homebrew, macports, etc. I've even heard of Linux distros that don't use /bin/bash, but I can't find any on Google right now. Some programs use "#! /usr/bin/env bash", which is more portable. But it's always better to use "#! /bin/sh" for scripts that are bourne-compatible, which this one is.

@anadon
Copy link
Contributor

anadon commented Aug 31, 2018

Good enough for me. I'll add this to the first batch of merges since it can fix things.

@jzmaddock jzmaddock merged commit 726e953 into boostorg:develop Oct 12, 2018
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

Successfully merging this pull request may close these issues.

3 participants