On Monday 08 April 2013 13:31:50 Trevor Woerner wrote:
> On Fri, Apr 5, 2013 at 12:59 PM, Peter Kjellerstedt
> <[email protected]> wrote:
> > +[ "${PATH#$NEWPATHS}" != "$PATH" ] || PATH="$NEWPATHS$PATH"
> 
> This is certainly a welcome addition in functionality, but it relies
> on the pattern remaining at the start of the PATH (i.e. the user
> hasn't played with PATH in any way). Could we not use the
> ${parameter/pattern/string} parameter expansion instead (e.g.
> "${PATH/$NEWPATHS/}") so it doesn't matter whether the user has
> further modified the PATH?

Unfortunately I think this is specific to bash, so it may not be portable. 
Maybe the equivalent can be achieved with sed however.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Reply via email to