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 23:22:12 +0100 |
commit | 704613b2ec5d61eeeaa96b4cfdf7d2475ffa48ec (patch) | |
tree | c9e8564bf3fff4907ab88044e277432ae6dae0af | |
parent | 4bd647af8344ee91ce7f495d50b0d9211faf60db (diff) | |
download | poky-704613b2ec5d61eeeaa96b4cfdf7d2475ffa48ec.tar.gz |
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]
(From OE-Core rev: 9414382f96d4a5d81cca440c75140950ca515aab)
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | |||
3 | # Yocto Project compatibility layer tool wrapper | ||
4 | # | ||
5 | # Creates a temprary build directory to run Yocto Project Compatible | ||
6 | # script to avoid a contaminated environment. | ||
7 | # | ||
8 | # Copyright (C) 2017 Intel Corporation | ||
9 | # Released under the MIT license (see COPYING.MIT) | ||
10 | |||
11 | if [ -z "$BUILDDIR" ]; then | ||
12 | echo "Please source oe-init-build-env before run this script." | ||
13 | exit 2 | ||
14 | fi | ||
15 | |||
16 | base_dir=$(realpath $BUILDDIR/../) | ||
17 | cd $base_dir | ||
18 | |||
19 | build_dir=$(mktemp -p $base_dir -d -t build-XXXX) | ||
20 | |||
21 | source oe-init-build-env $build_dir | ||
22 | yocto-compat-layer.py "$@" | ||
23 | retcode=$? | ||
24 | |||
25 | rm -rf $build_dir | ||
26 | |||
27 | exit $retcode | ||