diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2020-10-26 11:06:03 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2020-10-27 13:59:46 -0700 |
commit | ec9456feb8f14c173a8786c136a1bc496579231b (patch) | |
tree | 46cc8ec6ae39f174fd662fdf0a1a9361062f6ee1 /.github/ISSUE_TEMPLATE | |
parent | 9f89a7e9f7ce279e4b47ec06a9ffb90a453b2f7a (diff) | |
download | spack-ec9456feb8f14c173a8786c136a1bc496579231b.tar.gz spack-ec9456feb8f14c173a8786c136a1bc496579231b.tar.bz2 spack-ec9456feb8f14c173a8786c136a1bc496579231b.tar.xz spack-ec9456feb8f14c173a8786c136a1bc496579231b.zip |
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`
Diffstat (limited to '.github/ISSUE_TEMPLATE')
0 files changed, 0 insertions, 0 deletions