public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Joshua Downer <joshua.downer@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Joshua Downer <joshua.downer@gmail.com>
Subject: [PATCH] scripts/oe-oe-buildenv-internal: add SCRIPTSDIR
Date: Tue,  6 Sep 2022 06:36:14 -0400	[thread overview]
Message-ID: <20220906103614.37073-1-joshua.downer@gmail.com> (raw)

The addition of the SCRIPTSDIR variable allows the user to customize the
location of the scripts/ directory. The default remains $OEROOT/scripts.

Signed-off-by: Joshua Downer <joshua.downer@gmail.com>
---
 scripts/oe-buildenv-internal | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal
index 485d4c52e1..564b7c8b55 100755
--- a/scripts/oe-buildenv-internal
+++ b/scripts/oe-buildenv-internal
@@ -77,6 +77,11 @@ if [ -z "$BITBAKEDIR" ]; then
     test -d "$BITBAKEDIR" || BITBAKEDIR="$OEROOT/../bitbake$BBEXTRA"
 fi
 
+if [ -z "$SCRIPTSDIR" ]; then
+    SCRIPTSDIR="$OEROOT/scripts"
+fi
+
+SCRIPTSDIR=$(readlink -f "$SCRIPTSDIR")
 BITBAKEDIR=$(readlink -f "$BITBAKEDIR")
 BUILDDIR=$(readlink -f "$BUILDDIR")
 BBPATH=$BUILDDIR
@@ -93,7 +98,7 @@ PYTHONPATH=$BITBAKEDIR/lib:$PYTHONPATH
 export PYTHONPATH
 
 # Make sure our paths are at the beginning of $PATH
-for newpath in "$BITBAKEDIR/bin" "$OEROOT/scripts"; do
+for newpath in "$BITBAKEDIR/bin" "$SCRIPTSDIR"; do
     # Remove any existences of $newpath from $PATH
     PATH=$(echo $PATH | sed -re "s#(^|:)$newpath(:|$)#\2#g;s#^:##")
 
-- 
2.25.1



             reply	other threads:[~2022-09-06 10:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-06 10:36 Joshua Downer [this message]
2022-09-06 10:59 ` [OE-core] [PATCH] scripts/oe-oe-buildenv-internal: add SCRIPTSDIR Alexander Kanavin

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=20220906103614.37073-1-joshua.downer@gmail.com \
    --to=joshua.downer@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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