On 1-11-2012 11:09, Uwe Koloska wrote:
Hello,

Am 31.10.2012 00:21, schrieb Hans Hagen:
This assumes control over the login shell as well as control over what
the launchers of system processes use. I must admit that till now I
always assumed some stability in this, which is probably okay as long
as one sticks to one specific distribution (of linux).

There is stability in that /bin/sh always must be a (posix compatible)
bourne (not again) style shell!

I think that the main problem is that #! /bin/sh can mean anything
(although in your case I suppose you expect it to be the bourne shell).

A shell available as /bin/sh can have far more features but you can not
rely on them!

So the question is, should the scripts that come with context (like
the installer) be explicit and become #! /bin/bash ?

If the scripts do use bashisms they have to be declared with #!
/bin/bash.  So you do have this options:

* 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. For example to make it compatible to a
minimal system (a jeos VM comes to mind) that is not supposed to provide
/bin/bash.

add to this: don't use google cq. and don't look into other scripts to get an idea on what to do but buy a book on scripting

(thinking of it: i might as well stick to lua scripts)

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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