Commit graph

12 commits

Author SHA1 Message Date
Avery Pennarun
2d17be11ed sh.do: explicitly check /bin/sh instead of sh.
Because our experiment involves creating a file called redo/sh, and the
redo directory (or some other version of redo's dirctory) might be on
the path, just testing 'sh' is actually wrong: we might end up with
some earlier version of redo-sh.

Instead, specifically for sh, always demand that we test /bin/sh.
2018-12-04 02:43:58 -05:00
Avery Pennarun
0d174f92c3 redo-sh: downgrade failures that affected dash; add a bash warning.
I feel a little dirty doing this, but the way the code was before, redo
almost always picked bash as the shell.  bash is way too overpowered
and this led to bashisms in do scripts unnecessarily.  The two failures
in dash are things that I would really like to have, but they haven't
materialized after 6 years, so I guess we should be realistic.

To appropriately penalize bash for asking for trouble, I added a
warning about [ 1 == 1 ] syntax being valid (as opposed to the POSIX
correct [ 1 = 1 ]).  This allows dash to be selected ahead of bash.

I also moved 'sh' to the end of the list, because although it's the
weakest shell on some systems, on other systems it's just bash.  And I
put zsh in front of bash, because fewer people have zsh and we want
them to test zsh.
2018-10-12 05:18:25 -04:00
Avery Pennarun
2fa8aab191 redo-sh: reverse a case that caused 'set -e' to abort on zsh.
Correctly, I might add.  It's too bad none of my other shells did it.  Sigh.
2011-05-08 01:25:26 -04:00
Avery Pennarun
b993e449f8 shelltest: use a more magical magic number for success.
There may be some odd situation where a shell returns 0 despite not executing
the script correctly; now 0 is an error condition.
2011-04-17 23:39:53 -04:00
Avery Pennarun
3b940696c1 redo-sh.do: prettier log messages.
Make it easier to see which shells fail/warn about what.
2011-04-02 15:33:13 -07:00
Avery Pennarun
97eea66830 redo-sh.do: add 'posh' as another possible shell.
It fails, but who knows, maybe someday it won't.
2011-02-28 22:11:28 -08:00
Avery Pennarun
2dde4dbced redo-sh: on Solaris, try /usr/xpg4/bin/sh for a POSIX shell.
Suggested by someone on news.ycombinator.
2011-02-28 05:45:20 -08:00
Jimmy
b18404aab7 redo-sh.do: add mksh to the list of possible shells. 2011-01-19 13:52:02 -08:00
Avery Pennarun
eea3f5446a redo-sh: keep testing even after finding a 'good' shell.
Otherwise we miss out on seeing the results from additional tests.
2011-01-02 12:00:37 -08:00
Henry Gebhardt
d55e329018 redo-sh.do: hide warning output from 'which' in some shells. 2011-01-02 11:49:51 -08:00
Avery Pennarun
f2ef945700 redo-sh.do: wrap long lines. 2011-01-02 11:49:34 -08:00
Avery Pennarun
fb388b3dde Automatically select a good shell instead of relying on /bin/sh.
This includes a fairly detailed test of various known shell bugs from the
autoconf docs.

The idea here is that if redo works on your system, you should be able to
rely on a *good* shell to run your .do files; you shouldn't have to work
around zillions of bugs like autoconf does.
2010-12-21 04:44:39 -08:00