diff options
-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 | ||