| # 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 |
| # SPDX-License-Identifier: MIT |
| if [ -z "$BUILDDIR" ]; then |
| echo "Please source oe-init-build-env before run this script." |
| # since we are using a temp directory, use the realpath for output |
| o) output_log=$(realpath "$OPTARG") |
| # generate a temp directory to run check layer script |
| base_dir=$(realpath $BUILDDIR/../) |
| build_dir=$(mktemp -p $base_dir -d -t build-XXXX) |
| this_dir=$(dirname $(readlink -f $0)) |
| source $this_dir/../oe-init-build-env $build_dir |
| if [[ $output_log != '' ]]; then |
| yocto-check-layer -o "$output_log" "$*" |