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.

sed -i 's|^[ \t]*make[ \t\r\n]*$|& CC=distcc \$NUMJOBS|'
/var/lib/sbopkg/SBo/*/*/*/*.SlackBuild.sbopkg


On Sat, Apr 13, 2013 at 3:50 PM, <openpand...@free.fr> wrote:

> Hi !
>
> I plan to use distcc to compile a lot of SBo packages.
> As i know no other method (maybe there's an easier one ?), i use sed to
> alter the *.SlackBuild.sbopkg :
>
> This sed job will replace the "make $NUMJOBS" with "make CC=distcc
> $NUMJOBS"
>
> sed '/NUMJOBS/s/make/make CC=distcc/g'
> /var/lib/sbopkg/SBo/*/*/*/*.SlackBuild.sbopkg
>
> But i don't know how to replace the lines with "make" only.
>
> Any tips ?
> _______________________________________________
> SlackBuilds-users mailing list
> SlackBuilds-users@slackbuilds.org
> http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
> Archives - http://lists.slackbuilds.org/pipermail/slackbuilds-users/
> FAQ - http://slackbuilds.org/faq/
>
>
_______________________________________________
SlackBuilds-users mailing list
SlackBuilds-users@slackbuilds.org
http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - http://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - http://slackbuilds.org/faq/

Reply via email to