On 06/05/15 01:33, Jim Meyering wrote:
On Tue, May 5, 2015 at 2:50 PM, Ángel González<[email protected]> wrote:
I don't think that we should spend any effort attempting to support
non-POSIX shells
(Solaris sh seems the only midly common under that category).
That said, it would be nice to have a nicer error message.
Happy to reiterate :-)
Please don't waste time on shells that don't support $(...).
I agree that it is important to die early when the selected shell is inadequate.
I prefer to use the approach taken in gnulib's init.sh, which is used in most
of coreutils' tests:
http://git.savannah.gnu.org/cgit/gnulib.git/tree/tests/init.sh
A really clean solution :)
test $(echo y) = y || exit 1
It would be simple to add to bootstrap a line like
> test $(echo y) = y || die 'No $() support. Please use a POSIX shell.'
Although Dagobert reports that the error happens *earlier*, inside warnf_
-it already uses $()- which makes the fix a bit unpleasant:
bootstrap: syntax error at line 88: `me_=$’ unexpected
FWIW the OP problem -solved by using bash- was
./bootstrap: 1: eval: Bad substitution ./bootstrap: Please install the
prerequisite programs
I still wonder what /bin/sh he has on his Ubuntu box.