summaryrefslogtreecommitdiffstats
path: root/scripts/yocto-compat-layer-wrapper
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/yocto-compat-layer-wrapper')
-rwxr-xr-xscripts/yocto-compat-layer-wrapper27
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
11if [ -z "$BUILDDIR" ]; then
12 echo "Please source oe-init-build-env before run this script."
13 exit 2
14fi
15
16base_dir=$(realpath $BUILDDIR/../)
17cd $base_dir
18
19build_dir=$(mktemp -p $base_dir -d -t build-XXXX)
20
21source oe-init-build-env $build_dir
22yocto-compat-layer.py "$@"
23retcode=$?
24
25rm -rf $build_dir
26
27exit $retcode