diff options
author | Aníbal Limón <anibal.limon@linux.intel.com> | 2017-03-30 14:01:14 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-04-05 12:36:44 +0100 |
commit | 9414382f96d4a5d81cca440c75140950ca515aab (patch) | |
tree | c665ea23d8d38ddf464bb693fea98838521d567e | |
parent | df2e1a8fbadffac0f1781a0d07e050356a007327 (diff) | |
download | openembedded-core-9414382f96d4a5d81cca440c75140950ca515aab.tar.gz openembedded-core-9414382f96d4a5d81cca440c75140950ca515aab.tar.bz2 openembedded-core-9414382f96d4a5d81cca440c75140950ca515aab.zip |
scripts: Add yocto-compat-layer-wrapper
This script will be used to create it's own build directory to make
runs of yocto-compat-layer.py againts layers isolated.
Example:
$ source oe-init-build-env
$ yocto-compat-layer-wrapper LAYER_DIR LAYER_DIR_N
[YOCTO #11164]
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
-rwxr-xr-x | scripts/yocto-compat-layer-wrapper | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/scripts/yocto-compat-layer-wrapper b/scripts/yocto-compat-layer-wrapper new file mode 100755 index 0000000000..db4b6871b8 --- /dev/null +++ b/scripts/yocto-compat-layer-wrapper @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +# Yocto Project compatibility layer tool wrapper +# +# Creates a temprary build directory to run Yocto Project Compatible +# script to avoid a contaminated environment. +# +# Copyright (C) 2017 Intel Corporation +# Released under the MIT license (see COPYING.MIT) + +if [ -z "$BUILDDIR" ]; then + echo "Please source oe-init-build-env before run this script." + exit 2 +fi + +base_dir=$(realpath $BUILDDIR/../) +cd $base_dir + +build_dir=$(mktemp -p $base_dir -d -t build-XXXX) + +source oe-init-build-env $build_dir +yocto-compat-layer.py "$@" +retcode=$? + +rm -rf $build_dir + +exit $retcode |