From c6a32c397c730392d5707c20614b568037ce7935 Mon Sep 17 00:00:00 2001 From: Samuel Dolt Date: Tue, 4 Oct 2022 15:18:41 +0200 Subject: [PATCH] refactor: oe-init-build-env renamed to coreos-init-build-env --- oe-init-build-env => coreos-init-build-env | 13 ++++++++++++- documentation/quick-build.rst | 6 +++--- 2 files changed, 15 insertions(+), 4 deletions(-) rename oe-init-build-env => coreos-init-build-env (76%) diff --git a/oe-init-build-env b/coreos-init-build-env similarity index 76% rename from oe-init-build-env rename to coreos-init-build-env index a6b2ca3..a9e039c 100755 --- a/oe-init-build-env +++ b/coreos-init-build-env @@ -1,7 +1,7 @@ #!/bin/sh # This script is used to setup the OE Build Envrionment -# Normally this is called as '. ./oe-init-build-env ' +# Normally this is called as '. ./core-init-build-env ' # On some shell, we can get the path of this script when sources. Otherwise we # use the current directory as a fallback @@ -42,3 +42,14 @@ fi # Call the oe-init-build-env scripts of openembedded-core . "${OEROOT}/oe-init-build-env" "${1:-$CORE_OS_ROOT/build}" +# Add the scripts directory of CoreOS to the path +# Make sure our paths are at the beginning of $PATH +for newpath in "${CORE_OS_ROOT}/scripts"; do + # Remove any existences of $newpath from $PATH + PATH=$(echo $PATH | sed -re "s#(^|:)$newpath(:|$)#\2#g;s#^:##") + + # Add $newpath to $PATH + PATH="$newpath:$PATH" +done +unset newpath +export PATH diff --git a/documentation/quick-build.rst b/documentation/quick-build.rst index 76e957b..ce729eb 100644 --- a/documentation/quick-build.rst +++ b/documentation/quick-build.rst @@ -72,12 +72,12 @@ Building an image Before building an image, we have to first configure the build. -To create a build folder with our default configuration, you can run the `oe-init-build-env` -script: +To create a build folder with our default configuration, you can run the +`coreos-init-build-env` script: .. code-block:: sh - ~/core-os$ source oe-init-build-env + ~/core-os$ source coreos-init-build-env .. note::