confio / cosmjs-types

JS and TS types relating to Protocol Buffers used by Cosmos-SDK and other related projects
Apache License 2.0
36 stars 42 forks source link

fix(scripts): improve portability #71

Closed egasimus closed 1 year ago

egasimus commented 1 year ago

This changes the scripts to use /usr/bin/env and system PATH to find Bash.

Although massively widespread, IIRC Bash is not part of POSIX proper. Therefore, unlike /bin/sh, it can't truly be relied on to be present under /bin [^0]

[^0]: For example, on NixOS, sh is the only thing in /bin, and env is the only thing in /usr/bin. So, to find the bash executable, /usr/bin/env looks on the system path and resolves to e.g. /nix/store/aw76ql7s2n8gl02swkf2i3bdn9m7qxvh-bash-interactive-5.2-p15/bin/bash :sweat_smile: