On Thu, 1 Nov 2012 12:10:58 +0100
Marco Patzer <home...@lavabit.com> wrote:

> 2012-11-01 Uwe Koloska:
> 
> > There is stability in that /bin/sh always must be a (posix
> > compatible) bourne (not again) style shell!
> 
> True
> 
> > * rewrite the scripts to be truly posix and use #! /bin/sh (the dash
> > links from another mail may help)
> > * leave the scripts alone with all their bashisms and declare them
> > with #! /bin/bash
> > 
> > My advice on this is: in all shellscripts you write, declare the
> > shell that you are testing the script with -- so on most linux
> > systems (and in windows unix environments like msys) use /bin/bash
> > and only change this to /bin/sh if you have to.
> 
> I do it the other way. Always write /bin/sh compatible scripts
> (actually first-setup.sh uses /bin/sh) and resort to /bin/bash if
> bash specific features save considerable effort.
> 
> > For example to make it compatible to a minimal system (a jeos VM
> > comes to mind) that is not supposed to provide /bin/bash.
> 
> FreeBSD comes without bash installed by default.

Whats more, bash is found under /usr/local/bin/bash on FreeBSD so
#! /bin/bash
is bound to FAIL.

Best use posix standard scripting. There is no need for bashisms.

Alan
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to