#!/bin/sh # This script is used to setup the OE Build Environment # Normally this is called as '. ./nwl-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 if [ -z "$NWL_ROOT" ]; then if [ -n "$BASH_SOURCE" ]; then NWL_ROOT=$(dirname "$BASH_SOURCE") elif [ -n "$ZSH_NAME" ]; then NWL_ROOT=$(dirname "$0") else NWL_ROOT="$(pwd)" fi fi # Get a non relative path to the root directory NWL_ROOT=$(readlink -f "${NWL_ROOT}") # CoreOS init settings COREOS_ROOT="${NWL_ROOT}/coreos" TEMPLATECONF="${NWL_ROOT}/templates" # Call the coreos-init-build-env scripts of CoreOS . "${COREOS_ROOT}/coreos-init-build-env" "${1:-$NWL_ROOT/build}" # From here the scripts and functions defined by CoreOS and # OpenEmbedded-Core are available # Add support for ##NWLS_LAYERSDIR## inside of bblayer template coreos-bblayers-envsub NWL_LAYERSDIR "${NWL_ROOT}/layers" coreos-bblayers-envsub NWL_EXTLAYERSDIR "${NWL_ROOT}/external-layers" # Add the scripts directory of the NWL to the path coreos_path_add "${NWL_ROOT}/scripts"