Hi all, I'm thingking og switching all the test scripts to use /bin/bash instead of /bin/sh. The main reason is that /bin/sh on linux can mean one of two things; bash in bourne shell comatibility mode or dash. These two behave differently enough to make it a pain to be always testing them. The other issue is that using some bash features will allow me to reuse code and reduce the amount of shell script that needs to be mainatained. Does anyone see any major problems with this? Cheers, Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
On Sep 15, 2013, at 15:25, Erik de Castro Lopo wrote:> I'm thingking og switching all the test scripts to use /bin/bash > instead > of /bin/sh. The main reason is that /bin/sh on linux can mean one of > two things; bash in bourne shell comatibility mode or dash. These two > behave differently enough to make it a pain to be always testing them. > > The other issue is that using some bash features will allow me to > reuse > code and reduce the amount of shell script that needs to be > mainatained. > > Does anyone see any major problems with this?I will admit that I'm very focused on Mac OS X, including older versions back to Tiger, 10.4 Along those lines, though, OSX not only includes bash, but uses it by default. Therefore, you'll hear no complaints from me for requiring bash instead of sh. I suppose if there are other operating systems that somehow don't have bash, but already support flac, then someone should speak up. I wouldn't want to see support for flac dropped on a platform that is still reasonably viable. Even in that case, though, I suppose sh could be a fallback if bash is unavailable. Brian
On 13-09-15 3:25 PM, Erik de Castro Lopo wrote:> I'm thingking og switching all the test scripts to use /bin/bashFine with me. In theory you can do useful functions with portable shell, but it's a testing burden, as you say. -r
This is fine with me. I started this process long ago as well, and would make the recommendation that if you use BASH, keep the bashisms to BASH 2.03 or lower. If you script wtih BASH 2 as the lowest common denominator, you'll find that most systems are supported (even Solaris 8 -- BASH 2.03b). Erik is right, you can definitely simplify many of the tests and source many of the duplicated functions/code that currently exist. Long story short, I'm all for it. On Sun, Sep 15, 2013 at 7:57 PM, Ralph Giles <giles at thaumas.net> wrote:> On 13-09-15 3:25 PM, Erik de Castro Lopo wrote: > > > I'm thingking og switching all the test scripts to use /bin/bash > > Fine with me. > > In theory you can do useful functions with portable shell, but it's a > testing burden, as you say. > > -r > _______________________________________________ > flac-dev mailing list > flac-dev at xiph.org > http://lists.xiph.org/mailman/listinfo/flac-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/flac-dev/attachments/20130915/8bf4224f/attachment.htm
Erik de Castro Lopo <flac-dev at xiph.org> wrote:> I'm thingking og switching all the test scripts to use /bin/bash instead > of /bin/sh.Well, it does mean an additional bash dependency on systems that don't natively include bash, e.g. *BSD. (And when you install bash on these systems, it won't end up in /bin, so #! will have to be patched anyway.)> Does anyone see any major problems with this?Major, no. Just another annoyance. -- Christian "naddy" Weisgerber naddy at mips.inka.de