scripting environments (was: /bin/date and coreutils)

Elias Pipping pipping at macports.org
Fri May 11 11:25:24 PDT 2007


On May 11, 2007, at 7:12 PM, Marc André Selig wrote:

> On 5/11/07, Elias Pipping <pipping at macports.org> wrote:
>> a system that doesn't have bash anywhere should be considered  
>> broken ;)
>>
>> Is there really a macports user on solaris?
>
> The thread was about making scripts portable, not about making them
> work on OS X only.
>
> I don't use MacPorts on Solaris (why should I), but I do write things
> that have to work on several platforms, including OS X and Solaris.
>
> Regards,
> Marc

Indeed, I'm missing the point. So... make a script that can live with  
the bourne shell invoke /bin/sh then and if it can't, make it invoke  
'/usr/bin/env bash' because if bash needs to be invoked at all cost,  
that's the best way to do it.

Regards,

Elias


More information about the macports-users mailing list