[U-Boot] HUSH logical AND/OR expressions
James Chargin
jimccrown at gmail.com
Tue Apr 28 21:13:18 CEST 2015
Dear Joe,
On 04/28/2015 11:35 AM, Joe Hershberger wrote:
> Hi James,
>
> On Tue, Apr 28, 2015 at 1:19 PM, James Chargin <jimccrown at gmail.com> wrote:
>> Dear Joe Hershberger,
>>
>> On 04/28/2015 11:00 AM, Joe Hershberger wrote:
>>>
>>> Hi Joakim,
>>>
>>> On Mon, Apr 27, 2015 at 8:39 AM, Joakim Tjernlund
>>> <joakim.tjernlund at transmode.se> wrote:
>>>>
>>>> Trying to get a better handle of HUSH shell expressions, this does not
>>>> work as I expect:
>>>> => false && true || echo ECHO
>>>> => false && false || echo ECHO
...
>
> I always just assumed this was a limitation of hush, but it's now
> looking like a bug instead.
>
> I haven't debugged into it, but I tend to stay away from hush these
> days. When I've submitted a bug fix to this area I've been told that
> we should upgrade wholesale instead, and I've haven't been up for that
> task so far. http://lists.denx.de/pipermail/u-boot/2012-November/139841.html
That's a great conversation with Wolfgang, thanks for the reference.
Like you, I have tended to use hush carefully. It is similar to sh/bash,
but different enough that I never count on an easy port of bash script
fragments.
I noticed you asked for a reference to the original hush code that is
the origin for U-Boot's adaptation. I couldn't find a reply to that
question. I also haven't been able to find anything with a quick we
search. Do you know where it did come from?
>
> Perhaps there is an easy, minor bugfix for this that would be palette-able.
I've been "afraid" of the hush code for a while. I don't think I want to
mess with it now. I'll just continue to work with what we've got, carefully.
Thanks again for your attention,
Jim
More information about the U-Boot
mailing list