Re: [Toybox] making ./configure executable.

2018-02-06 Thread Rob Landley
On 02/06/2018 11:04 AM, enh wrote: >> So when I say "a proper bash replacement" I'm _mostly_ targeting bash >> 2.x with proper utf8 and the occasional new feature like ~= (regex >> matches) that are easy to do. Stuff like <(command) and file{1,2}.txt >> are over 20 years old. > > <(command) isn't

Re: [Toybox] making ./configure executable.

2018-02-06 Thread enh
On Tue, Feb 6, 2018 at 8:45 AM, Rob Landley wrote: > On 02/05/2018 09:41 PM, Robert Thompson wrote: >> Yeah, I ran into some similar issues years ago... In my case, I got >> burned into learning not to assume that bash (or any other shell) is >> correct, or even necessarily

Re: [Toybox] making ./configure executable.

2018-02-06 Thread Rob Landley
On 02/05/2018 09:41 PM, Robert Thompson wrote: > Yeah, I ran into some similar issues years ago... In my case, I got > burned into learning not to assume that bash (or any other shell) is > correct, or even necessarily *self* consistent(even on linux), so I > tend to reflexively do differential

Re: [Toybox] making ./configure executable.

2018-02-05 Thread Robert Thompson
Yeah, I ran into some similar issues years ago... In my case, I got burned into learning not to assume that bash (or any other shell) is correct, or even necessarily *self* consistent(even on linux), so I tend to reflexively do differential checks. It's a very small amount of effort in the

Re: [Toybox] making ./configure executable.

2018-02-05 Thread Robert Thompson
It seems that the single-equals is POSIX, while the double-equals is a bash extension that at one point bash preferred and extended the match behavior of. But, the bash manpage now documents double-equals (when in the context of the builtin test or its '[' alias) as equivalent to single-equals.

Re: [Toybox] making ./configure executable.

2018-02-05 Thread Ryan Prichard
FWIW: I think the problem is the double-equals operator: $ /bin/dash -c 'if [ x = x ]; then echo foo; fi' foo $ /bin/dash -c 'if [ x == x ]; then echo foo; fi' /bin/dash: 1: [: x: unexpected operator $ /bin/dash -c 'if /usr/bin/[ x == x ]; then echo foo; fi' foo POSIX hasn't specified ==. I'm