[Geeks] bash/dash/sh mess
Andrew Janke
a.janke at gmail.com
Sat Apr 5 19:34:42 EDT 2008
At the risk of being a purist.... :)
I recommend _NOT_ symlinking things. Other things will just break in
the future. Yes, the debianista are being a tad retentive but I can
well understand their reasons. The FSL bods have struck this problem
also.
The only real fix for this is to fix the "sh" scripts themselves or
change them to bash. '==' is not allowed in POSIX sh and should be
replaced with '='.
I have submitted a number of patches to FSL for this in their shell
scripts already.
a
PS: note that these problem happen on OSX as well with later releases....
On Sun, Apr 6, 2008 at 6:09 AM, Alex Zijdenbos <alex at bic.mni.mcgill.ca> wrote:
> Hello all,
>
> I suspect I am not the first one to run into this so I was wondering
> how others have dealt with this. Ubuntu uses dash as the default sh by
> symlinking /bin/sh to /bin/dash, which breaks an awful lot of BIC/MINC
> scripts which call #!/bin/sh as the interpreter. Mostly, dash does not
> accept the use of '==', which then gives rise to errors like
>
> [: 37: ==: unexpected operator
>
> this is for instance from Claude's pipeline install script; I also got
> it for nu_correct and a bunch of other things. The explanation lives
> in
>
> https://wiki.ubuntu.com/DashAsBinSh
>
> where the suggestions are to either fix #!/bin/sh scripts ot be POSIX
> compliant, or to change them to use #!/bin/bash, or to 'sudo
> dpkg-reconfigure dash' to change the symlink (which appears to have
> happened on the BIC systems).
>
> Any thoughts/suggestions? Do a global search-and-replace through the
> MINC codebase replacing #!/bin/sh to #!/bin/bash? Or fix the non-POSIX
> stuff in them?
>
> -- A
> _______________________________________________
> Geeks mailing list
> Geeks at bic.mni.mcgill.ca
> http://www2.bic.mni.mcgill.ca/mailman/listinfo/geeks
>
--
Andrew Janke (a.janke at gmail.com || http://a.janke.googlepages.com/)
Canberra->Australia +61 (402) 700 883
More information about the Geeks
mailing list