From b32174e58e89119e3ca2315030629a6580ccbd52 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Tue, 19 Sep 2017 15:57:07 +1200 Subject: scripts: rename yocto-compat-layer to remove "compatible" nomenclature "Yocto Project Compatible" [1] is a programme which requires you meet specific criteria including going through an application process - it is not sufficient simply to run the script we have created here and have it produce no warnings/errors. To avoid people being confused by the fact that this script uses the term "compatible" or variations thereof, substitute usage of that word with "check" instead. The functionality of the script is unchanged. [1] https://www.yoctoproject.org/ecosystem/yocto-project-branding-program (From OE-Core rev: 2a6126a115f10750ea89f95629d3699ad41c5665) Signed-off-by: Paul Eggleton Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- scripts/yocto-check-layer-wrapper | 43 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100755 scripts/yocto-check-layer-wrapper (limited to 'scripts/yocto-check-layer-wrapper') diff --git a/scripts/yocto-check-layer-wrapper b/scripts/yocto-check-layer-wrapper new file mode 100755 index 0000000000..bbf6ee176d --- /dev/null +++ b/scripts/yocto-check-layer-wrapper @@ -0,0 +1,43 @@ +#!/usr/bin/env bash + +# Yocto Project layer check tool wrapper +# +# Creates a temporary build directory to run the yocto-check-layer +# 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 + +# since we are using a temp directory, use the realpath for output +# log option +output_log='' +while getopts o: name +do + case $name in + o) output_log=$(realpath "$OPTARG") + esac +done +shift $(($OPTIND - 1)) + +# generate a temp directory to run check layer script +base_dir=$(realpath $BUILDDIR/../) +cd $base_dir + +build_dir=$(mktemp -p $base_dir -d -t build-XXXX) + +source oe-init-build-env $build_dir +if [[ $output_log != '' ]]; then + yocto-check-layer -o "$output_log" "$*" +else + yocto-check-layer "$@" +fi +retcode=$? + +rm -rf $build_dir + +exit $retcode -- cgit v1.2.3-54-g00ecf