Scripts assume bash is /bin/bash
We have #!/bin/bash
hard coded in several scripts.
While that is completely safe on our current target systems, it is not always true.
In particular, I am concerned that Apple's change (in Catalina) to /bin/zsh
as the default shell could be part of a longer term plan to cease distributing bash at all (as has already been hinted at for perl).
#!/usr/bin/env bash
might work if we assume /usr/bin/env
is sufficiently universal.
Substitution is possible at install time, with some care.
This could be done with a probe in configure
once PR134 has introduced one.
Of course that means the configure script itself might need a "bootstrap" to find bash for its own use!
For that I think --with-bash=...
would be good enough.
Comments (2)
-
reporter -
reporter - changed status to resolved
Support bash in locations other than /bin
This commit makes all the necessary changes to allow compilation of UPC++ on a FreeBSD system with
bash
located/usr/local/bin/bash
. This includes havingconfigure
search$PATH
for a shell to run itself with, substitution into generated in-build-tree scripts, setting ofSHELL
in makefiles, and rewriting of the she-bang when installingupcxx.sh
.Resolves issue
#295→ <<cset 03a52d5c4e5e>>
- Log in to comment
Proposed fix appears in pull request 160
No "bootstrap" via
--with-bash
was required.