Re: [NTG-context] scripts

2012-11-01 Thread Pontus Lurcock
On Thu 01 Nov 2012, Alan BRASLAU wrote: > Whats more, bash is found under /usr/local/bin/bash on FreeBSD so > #! /bin/bash > is bound to FAIL. One traditional solution is to use #!/usr/bin/env bash This of course assumes the path to env, but I believe that the env path is more standardized than

Re: [NTG-context] scripts

2012-11-01 Thread Alan BRASLAU
On Thu, 1 Nov 2012 12:10:58 +0100 Marco Patzer 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 an

Re: [NTG-context] scripts

2012-11-01 Thread Marco Patzer
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 a

Re: [NTG-context] scripts

2012-11-01 Thread Hans Hagen
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

Re: [NTG-context] scripts

2012-11-01 Thread Uwe Koloska
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 dis

Re: [NTG-context] scripts

2012-10-30 Thread Bill Meahan
On 10/30/2012 07:21 PM, Hans Hagen wrote: So the question is, should the scripts that come with context (like the installer) be explicit and become #! /bin/bash ? Hans If you're depending on specific syntax or features of bash, that would be the way to go. I suspect most/all Linux and B

Re: [NTG-context] scripts

2012-10-30 Thread luigi scarso
On Wed, Oct 31, 2012 at 12:21 AM, Hans Hagen wrote: > On 30-10-2012 22:33, Bill Meahan wrote: > >> On 10/30/2012 01:39 PM, Hans Hagen wrote: >> >>> >>> sure, till one replaces bash by something non-bash-ish while the user >>> still thinks he's running bash (i always fear the moment that someone >

Re: [NTG-context] scripts

2012-10-30 Thread Hans Hagen
On 30-10-2012 22:33, Bill Meahan wrote: On 10/30/2012 01:39 PM, Hans Hagen wrote: sure, till one replaces bash by something non-bash-ish while the user still thinks he's running bash (i always fear the moment that someone decides that swapping the 'cp' arguments without renaming the command is

Re: [NTG-context] scripts

2012-10-30 Thread Bill Meahan
On 10/30/2012 01:39 PM, Hans Hagen wrote: sure, till one replaces bash by something non-bash-ish while the user still thinks he's running bash (i always fear the moment that someone decides that swapping the 'cp' arguments without renaming the command is a good idea -) (i wouldn't be surpri

Re: [NTG-context] scripts

2012-10-30 Thread Hans Hagen
On 30-10-2012 18:50, Pontus Lurcock wrote: On Tue 30 Oct 2012, Hans Hagen wrote: FWIW, Debian and Ubuntu have a package ‘devscripts’ which includes a program ‘checkbashisms’ to catch such things (Ubuntu started using dash as the default sh back in 2006). Ubuntu also has some advice hm, so i w

Re: [NTG-context] scripts

2012-10-30 Thread Hans Hagen
On 30-10-2012 18:38, Pontus Lurcock wrote: On Tue 30 Oct 2012, Bill Meahan wrote: On 10/30/2012 01:20 PM, Hans Hagen wrote: filename 2>&1 This has been the correct Bourne shell (POSIX) syntax for many years. I think it goes all the way back to Bell Labs V7 IIRC instead of &>filename. is

Re: [NTG-context] scripts

2012-10-30 Thread Hans Hagen
On 30-10-2012 18:38, Pontus Lurcock wrote: On Tue 30 Oct 2012, Bill Meahan wrote: On 10/30/2012 01:20 PM, Hans Hagen wrote: filename 2>&1 This has been the correct Bourne shell (POSIX) syntax for many years. I think it goes all the way back to Bell Labs V7 IIRC instead of &>filename. is

Re: [NTG-context] scripts

2012-10-30 Thread Pontus Lurcock
On Tue 30 Oct 2012, Hans Hagen wrote: > >FWIW, Debian and Ubuntu have a package ‘devscripts’ which includes a > >program ‘checkbashisms’ to catch such things (Ubuntu started using > >dash as the default sh back in 2006). Ubuntu also has some advice > > hm, so i wonder why setuptex fails on that b

Re: [NTG-context] scripts

2012-10-30 Thread Hans Hagen
On 30-10-2012 18:38, Pontus Lurcock wrote: On Tue 30 Oct 2012, Bill Meahan wrote: On 10/30/2012 01:20 PM, Hans Hagen wrote: filename 2>&1 This has been the correct Bourne shell (POSIX) syntax for many years. I think it goes all the way back to Bell Labs V7 IIRC instead of &>filename. is

Re: [NTG-context] scripts

2012-10-30 Thread Hans Hagen
On 30-10-2012 18:26, Bill Meahan wrote: On 10/30/2012 01:20 PM, Hans Hagen wrote: >filename 2>&1 This has been the correct Bourne shell (POSIX) syntax for many years. I think it goes all the way back to Bell Labs V7 IIRC instead of &>filename. is a "bash-ism" sure, till one replaces bas

Re: [NTG-context] scripts

2012-10-30 Thread Pontus Lurcock
On Tue 30 Oct 2012, Bill Meahan wrote: > On 10/30/2012 01:20 PM, Hans Hagen wrote: > > >filename 2>&1 > > This has been the correct Bourne shell (POSIX) syntax for many > years. I think it goes all the way back to Bell Labs V7 IIRC > > >instead of &>filename. > > is a "bash-ism" FWIW, Debian a

Re: [NTG-context] scripts

2012-10-30 Thread Bill Meahan
On 10/30/2012 01:20 PM, Hans Hagen wrote: >filename 2>&1 This has been the correct Bourne shell (POSIX) syntax for many years. I think it goes all the way back to Bell Labs V7 IIRC instead of &>filename. is a "bash-ism" I checked the scripts in the context tree and so far found no occ

[NTG-context] scripts

2012-10-30 Thread Hans Hagen
Hi, I wasted a whole afternoon figuring out why a job that runs ok on many opensuse machines fails on a machine that runs a debian alpha distribution (customer demand). I already had to fix all kind of startup scripts due to the fact that sh(ell scripts) are run with dash which is incompatibl