public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH] scripts/oe-oe-buildenv-internal: add SCRIPTSDIR
@ 2022-09-06 10:36 Joshua Downer
  2022-09-06 10:59 ` [OE-core] " Alexander Kanavin
  0 siblings, 1 reply; 2+ messages in thread
From: Joshua Downer @ 2022-09-06 10:36 UTC (permalink / raw)
  To: openembedded-core; +Cc: Joshua Downer

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [OE-core] [PATCH] scripts/oe-oe-buildenv-internal: add SCRIPTSDIR
  2022-09-06 10:36 [PATCH] scripts/oe-oe-buildenv-internal: add SCRIPTSDIR Joshua Downer
@ 2022-09-06 10:59 ` Alexander Kanavin
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander Kanavin @ 2022-09-06 10:59 UTC (permalink / raw)
  To: Joshua Downer; +Cc: OE-core

Can you explain the use case please? I'm not sure this should be added
to core if there are no uses or examples or tests for it.

Alex

On Tue, 6 Sept 2022 at 12:36, Joshua Downer <joshua.downer@gmail.com> wrote:
>
> 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
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#170342): https://lists.openembedded.org/g/openembedded-core/message/170342
> Mute This Topic: https://lists.openembedded.org/mt/93497736/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-06 10:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-06 10:36 [PATCH] scripts/oe-oe-buildenv-internal: add SCRIPTSDIR Joshua Downer
2022-09-06 10:59 ` [OE-core] " Alexander Kanavin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox