[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] /bin/sh vs. /bin/bash in Ubuntu

From: Joris van der Hoeven
Subject: Re: [Texmacs-dev] /bin/sh vs. /bin/bash in Ubuntu
Date: Sun, 26 Apr 2009 13:44:21 +0200
User-agent: Mutt/1.5.9i

Hi Andrey,

On Sun, Apr 26, 2009 at 03:09:24PM +0700, Andrey G. Grozin wrote:
> On Sat, 25 Apr 2009, Joris van der Hoeven wrote:
> >This /bin/sh issue comes up every now and then; a pain.
> >In principle, as long as we no not use any bash-specific stuff,
> >then we probably should stick to /bin/sh.
> >
> >Andrey, do you remember the previous conclusions on this subject?
> Maybe, I don't remember all issues, this was discussed many times. One I 
> remember is 'type -p' vs. 'which'. Initially, I used 'which' in 
> maxima_detect. This was inconvenient for cygwin: it not always has 'which' 
> (I never used cygwin; my understanding (maybe wrong) is that it has some 
> package system, and 'which' is available in some package, but it is not 
> installed by default). 'which' was replaced by 'type -p', which is 
> bash-specific. More recently, 'type -p' was replaced (in many scripts in 
> /usr/libexec/TeXmacs/bin) by 'which', to make these scripts more 
> sh-compatible. Has the cygwin problem disappeared somehow?

Thanks for refreshing my mind. Yes, I now remember the which issue:
long ago, this command was not implemented on several OSs,
but this problem has vanished with time. I think that the command now
exists under cygwin too, so we should be able to use it safely everywhere.

More generally, I now remember that we have made efforts to make
our scripts compatible with non-bash shells, since there remain OSs
where bash is not supported by default (SUN OS, for instance, I believe).
Hence, it is best to use /bin/sh whenever possible.

I am surprised by the problem under Ubuntu: is /bin/sh not there?
This is weird, since UNIX requires /bin/sh to exist.

> In any case, currently ( all scripts in /usr/libexec/TeXmacs/bin 
> use 'which', except tm_mathematica (it still uses 'type -p'). I think it 
> would be good to replace 'type -p' by 'which' in tm_mathematica, for 
> consistency. Though this script is hardly used by anybody: it worked 
> more-or-less well with mathematica-4.*, and the current version is 7, many 
> things don't work anymore :-(


> I don't know what other bash-specific features are used in these scripts. 
> Probably, there are some, because there is some breakage on ubuntu. Ubuntu 
> users can investigate what scripts (and what lines in them) don't work in 
> the expected way.

Best wishes, Joris

P.S.: did you try the new computer algebra sessions? Everything has been 
in Scheme now and I made a few extensions. More should follow later this year.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]