9 ms·
Help me add FreeBSD/amd64 build support to .NET CoreCLR
- umanwizard 12y ago#!/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.
- brianmwaters_hn 12y agoExcept 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
- umanwizard 12y agoWhoops. You are right. I don't know how to edit my comment...
- necrodawg 12y agoMost of the time /bin/sh would suffice as no bash features are used but people still use /bin/bash.
- easytiger 12y agoAlso don't use absolute paths in your shebang
- nbaksalyar 12y agoSo e.g. in this case it'd be better to use just "#!env bash"?
- teddyh 12y agoThat doesn’t even work. The interpreter needs to use an absolute path, hence the trick with “env”.
- masklinn 12y agoThe executable is passed to execve, so it has to be an absolute path (part of the reason for the indirection via env)
- tedunangst 12y ago#!/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.
- masklinn 12y agoAssuming `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)
- lmm 12y ago#!/bin/bash is a linuxism. #!/usr/bin/env bash is the portable version.
- josteink 12y agoSo much mindless discussion about "Linuxism" and incorrect usage of bash. So little apparent willingness to help out. Kinda disappointing really.