blob: db4b6871b81d012ede2eb61b67c6aeaf8a3c8465 [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001#!/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