shtool

GNU portable shell tool for creating shell scripts portably

brewmacoslinux
Try with needOr install directly
Source

About

GNU's portable shell tool

Commands

shtool

Examples

Create a directory with parent directories if needed$ shtool mkdir -f -p -m 755 /path/to/nested/directory
Install a file with proper permissions and ownership$ shtool install -c -m 755 script.sh /usr/local/bin/
Generate a version number string$ shtool version -l long -d short