yocto-compat-layer-wrapper 592 B

123456789101112131415161718192021222324252627
  1. #!/usr/bin/env bash
  2. # Yocto Project compatibility layer tool wrapper
  3. #
  4. # Creates a temprary build directory to run Yocto Project Compatible
  5. # script to avoid a contaminated environment.
  6. #
  7. # Copyright (C) 2017 Intel Corporation
  8. # Released under the MIT license (see COPYING.MIT)
  9. if [ -z "$BUILDDIR" ]; then
  10. echo "Please source oe-init-build-env before run this script."
  11. exit 2
  12. fi
  13. base_dir=$(realpath $BUILDDIR/../)
  14. cd $base_dir
  15. build_dir=$(mktemp -p $base_dir -d -t build-XXXX)
  16. source oe-init-build-env $build_dir
  17. yocto-compat-layer.py "$@"
  18. retcode=$?
  19. rm -rf $build_dir
  20. exit $retcode