Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: Trevor Woerner <twoerner@gmail.com>
Cc: Peter Kjellerstedt <peter.kjellerstedt@axis.com>,
	openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 2/3] oe-buildenv-internal: Only add to $PATH if needed
Date: Mon, 08 Apr 2013 18:48:50 +0100	[thread overview]
Message-ID: <3664366.6RB48HkoAG@helios> (raw)
In-Reply-To: <CAHUNapRCw6pqVL1MfSkPqDZQL-adp-AHQba8+nGTPoi44BTguQ@mail.gmail.com>

On Monday 08 April 2013 13:31:50 Trevor Woerner wrote:
> On Fri, Apr 5, 2013 at 12:59 PM, Peter Kjellerstedt
> <peter.kjellerstedt@axis.com> 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



  reply	other threads:[~2013-04-08 18:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-05 16:59 [PATCH 0/3] Fixes for oe-init-build-env Peter Kjellerstedt
2013-04-05 16:59 ` [PATCH 1/3] oe-setup-builddir: Allow $OECORENOTESCONF to not exist Peter Kjellerstedt
2013-04-05 16:59 ` [PATCH 2/3] oe-buildenv-internal: Only add to $PATH if needed Peter Kjellerstedt
2013-04-08 17:31   ` Trevor Woerner
2013-04-08 17:48     ` Paul Eggleton [this message]
2013-04-08 22:40       ` Chris Larson
2013-04-09 10:01         ` Peter Kjellerstedt
2013-04-09 14:44           ` Chris Larson
2013-04-09 17:29       ` Trevor Woerner
2013-04-09 17:34         ` Trevor Woerner
2013-04-09 18:12           ` Paul Eggleton
2013-04-09 17:40         ` Khem Raj
2013-04-09 22:14         ` Mark Hatle
2013-04-05 16:59 ` [PATCH 3/3] oe-init-build-env: Make it use the correct $OEROOT with zsh Peter Kjellerstedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3664366.6RB48HkoAG@helios \
    --to=paul.eggleton@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=peter.kjellerstedt@axis.com \
    --cc=twoerner@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox