<div dir="ltr">The following may not work for 100% of use cases but does work in simple tests with "make" only on the line taking certain whitespace into account.  There are probably other regex's I'm missing but it probably accounts for most occurrences.<br>
<div><br>sed -i 's|^[ \t]*make[ \t\r\n]*$|& CC=distcc \$NUMJOBS|' /var/lib/sbopkg/SBo/*/*/*/*.SlackBuild.sbopkg</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Apr 13, 2013 at 3:50 PM,  <span dir="ltr"><<a href="mailto:openpandora@free.fr" target="_blank">openpandora@free.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi !<br>
<br>
I plan to use distcc to compile a lot of SBo packages.<br>
As i know no other method (maybe there's an easier one ?), i use sed to alter the *.SlackBuild.sbopkg :<br>
<br>
This sed job will replace the "make $NUMJOBS" with "make CC=distcc $NUMJOBS"<br>
<br>
sed '/NUMJOBS/s/make/make CC=distcc/g' /var/lib/sbopkg/SBo/*/*/*/*.SlackBuild.sbopkg<br>
<br>
But i don't know how to replace the lines with "make" only.<br>
<br>
Any tips ?<br>
_______________________________________________<br>
SlackBuilds-users mailing list<br>
<a href="mailto:SlackBuilds-users@slackbuilds.org">SlackBuilds-users@slackbuilds.org</a><br>
<a href="http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users" target="_blank">http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users</a><br>
Archives - <a href="http://lists.slackbuilds.org/pipermail/slackbuilds-users/" target="_blank">http://lists.slackbuilds.org/pipermail/slackbuilds-users/</a><br>
FAQ - <a href="http://slackbuilds.org/faq/" target="_blank">http://slackbuilds.org/faq/</a><br>
<br>
</blockquote></div><br></div>