spack/lib/spack
Todd Gamblin ec9456feb8 sbang: convert sbang script to POSIX shell
`sbang` was previously a bash script but did not need to be. This
converts it to a plain old POSIX shell script and adds some options. This
also allows us to simplify sbang shebangs to `#!/bin/sh /path/to/sbang`
instead of `#!/bin/bash /path/to/sbang`.

The new script passes shellcheck (with a few exceptions noted in the file)

- [x] `SBANG_DEBUG` env var enables printing what *would* be executed
- [x] `sbang` checks whether it has been passed an option and fails gracefully
- [x] `sbang` will now fail if it can't find a second shebang line, or if
      the second line happens to be sbang (avoid infinite loops)
- [x] add more rigorous tests for `sbang` behavior using `SBANG_DEBUG`
2020-10-27 13:59:46 -07:00
..
docs docs: update docs on shell support and using packages (#19486) 2020-10-23 22:16:01 -07:00
env Adding AOCC compiler to SPACK community (#19345) 2020-10-20 10:50:09 -05:00
external Vendoring: remove dependency on Setuptools from vendored pytest (#15612) 2020-03-23 16:55:07 -07:00
llnl Environments: specify packages for developer builds (#15256) 2020-10-15 17:23:16 -07:00
spack sbang: convert sbang script to POSIX shell 2020-10-27 13:59:46 -07:00