#!/bin/bash isn't a Linuxism. #!/bin/sh and then relying on Bash features is.
#!/bin/bash just means your port has to depend on shells/bash, which is pretty reasonable.
Except by default, bash from the Ports tree gets but into /usr/local/bin/bash. An easy fix for users, but a better hashbang would be #!/usr/bin/env bash
Whoops. You are right. I don't know how to edit my comment...
Most of the time /bin/sh would suffice as no bash features are used but people still use /bin/bash.
Also don't use absolute paths in your shebang
So e.g. in this case it'd be better to use just "#!env bash"?
That doesn’t even work. The interpreter needs to use an absolute path, hence the trick with “env”.
The executable is passed to execve, so it has to be an absolute path (part of the reason for the indirection via env)
#!/bin/bash and then not using any features not available in sh (or using bash features that could be written trivially in sh) is definitely a linuxism.
Assuming `bash` is in `/bin` is definitely a linuxism. It won't be there on BSDs, and even when there's a bash there it may not be up to date (e.g. on OSX where up-to-date software is installed via homebrew or macports and the binaries are not in /bin)
#!/bin/bash is a linuxism. #!/usr/bin/env bash is the portable version.
So much mindless discussion about "Linuxism" and incorrect usage of bash.
So little apparent willingness to help out. Kinda disappointing really.