<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 2, 2014 at 2:00 AM, Radek Dostal <span dir="ltr">&lt;<a href="mailto:radek.dostal@streamunlimited.com" target="_blank">radek.dostal@streamunlimited.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">-            sed -i -e s:${D}::g &quot;$i&quot;<br>
+            # only modify file if it contains path to avoid recompilation on the target<br>
</div>+            if (grep &quot;${D}&quot; &quot;$i&quot;) &gt;/dev/null 2&gt;&amp;1</blockquote><div><br></div><div>If you&#39;re to go this route, I&#39;d suggest:<br><br></div><div>    if grep -q &quot;${D}&quot; &quot;$i&quot;; then<br>

<br></div><div>Avoids the unnecessary re-directions, and unnecessary sub-shell.<br></div></div>-- <br>Christopher Larson<br>clarson at kergoth dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Maintainer - Tslib<br>

Senior Software Engineer, Mentor Graphics
</div></div>