diff options
author | Leon Anavi <leon.anavi@konsulko.com> | 2017-08-18 14:27:37 +0300 |
---|---|---|
committer | Leon Anavi <leon.anavi@konsulko.com> | 2017-08-18 14:27:37 +0300 |
commit | b48fe3ed766250dac8564a0f6bd0b05988e35f5c (patch) | |
tree | 8e127827aea2f9a39ce11ce4f6ac548fe16852da /scripts/envsetup.sh | |
parent | 8a0ef9f142555c553d714668c611eae3df9f7a89 (diff) | |
download | meta-updater-b48fe3ed766250dac8564a0f6bd0b05988e35f5c.tar.gz |
scripts/envsetup.sh: Use machine specific local.conf
Use the configurations for local.conf provided by
layer meta-updater-* (depending on the machine)
if variable TEMPLATECONF has not been set.
Otherwise, if the variable is not set or if the
layer does not provide any configurations then
the default will be used (just as before this change).
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Diffstat (limited to 'scripts/envsetup.sh')
-rwxr-xr-x | scripts/envsetup.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/envsetup.sh b/scripts/envsetup.sh index ff78681..260b048 100755 --- a/scripts/envsetup.sh +++ b/scripts/envsetup.sh | |||
@@ -24,7 +24,15 @@ fi | |||
24 | METADIR="${SOURCEDIR}/../.." | 24 | METADIR="${SOURCEDIR}/../.." |
25 | 25 | ||
26 | if [[ ! -f "${BUILDDIR}/conf/local.conf" ]]; then | 26 | if [[ ! -f "${BUILDDIR}/conf/local.conf" ]]; then |
27 | source "$METADIR/poky/oe-init-build-env" "$BUILDDIR" | 27 | if [ -z "$TEMPLATECONF" ] && [ -d ${METADIR}/meta-updater-${MACHINE}/conf ]; then |
28 | # Use the template configurations for the specified machine | ||
29 | TEMPLATECONF=${METADIR}/meta-updater-${MACHINE}/conf | ||
30 | source "$METADIR/poky/oe-init-build-env" "$BUILDDIR" | ||
31 | unset TEMPLATECONF | ||
32 | else | ||
33 | # Use the default configurations or TEMPLATECONF set by the user | ||
34 | source "$METADIR/poky/oe-init-build-env" "$BUILDDIR" | ||
35 | fi | ||
28 | echo "METADIR := \"\${@os.path.abspath('${METADIR}')}\"" >> conf/bblayers.conf | 36 | echo "METADIR := \"\${@os.path.abspath('${METADIR}')}\"" >> conf/bblayers.conf |
29 | cat "${METADIR}/meta-updater/conf/include/bblayers/sota.inc" >> conf/bblayers.conf | 37 | cat "${METADIR}/meta-updater/conf/include/bblayers/sota.inc" >> conf/bblayers.conf |
30 | cat "${METADIR}/meta-updater/conf/include/bblayers/sota_${MACHINE}.inc" >> conf/bblayers.conf | 38 | cat "${METADIR}/meta-updater/conf/include/bblayers/sota_${MACHINE}.inc" >> conf/bblayers.conf |