From: Aníbal Limón Date: Thu, 30 Mar 2017 20:01:14 +0000 (-0600) Subject: scripts: Add yocto-compat-layer-wrapper X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~21766 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9414382f96d4a5d81cca440c75140950ca515aab;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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 Signed-off-by: Ross Burton --- diff --git a/scripts/yocto-compat-layer-wrapper b/scripts/yocto-compat-layer-wrapper new file mode 100755 index 00000000000..db4b6871b81 --- /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