<div dir="ltr">FWIW: I think the problem is the double-equals operator:<div><br></div><div><div>$ /bin/dash -c 'if [ x = x ]; then echo foo; fi'</div><div>foo</div></div><div><br></div><div><div>$ /bin/dash -c 'if [ x == x ]; then echo foo; fi'</div><div>/bin/dash: 1: [: x: unexpected operator</div></div><div><br></div><div><div>$ /bin/dash -c 'if /usr/bin/[ x == x ]; then echo foo; fi'</div><div>foo</div></div><div><br></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">POSIX hasn't specified ==. I'm guessing it's strictly equivalent to =?</span><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><a href="http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html">http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html</a></div></div></div><div><br></div><div>-Ryan<br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Feb 4, 2018 at 6:11 PM, Rob Landley <span dir="ltr"><<a href="mailto:rob@landley.net" target="_blank">rob@landley.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I tried adding this to configure:<br>
<br>
if [ "$(basename "$0")" == configure ]<br>
then<br>
  echo "This file is just a persistent place to set environment variables."<br>
  echo "You probably want to run 'make defconfig'."<br>
  echo "Type 'make help' for more options, or see the README."<br>
  exit 1<br>
fi<br>
<br>
But if your #!/bin/sh points to the Defective Annoying SHell it<br>
goes "unexpected operator [" EVEN THOUGH "[" IS IN THE $PATH,<br>
and I'm just not going there.<br>
<br>
So I've put #!/bin/bash at the top, set the executable bit, and<br>
I'm keeping the complaint to one line and running "make defconfig"<br>
anyway on the theory making it easier to use is better than trying<br>
to educating people with a pop-up window error.<br>
<br>
Rob<br>
______________________________<wbr>_________________<br>
Toybox mailing list<br>
<a href="mailto:Toybox@lists.landley.net">Toybox@lists.landley.net</a><br>
<a href="http://lists.landley.net/listinfo.cgi/toybox-landley.net" rel="noreferrer" target="_blank">http://lists.landley.net/<wbr>listinfo.cgi/toybox-landley.<wbr>net</a><br>
</blockquote></div><br></div>