diff options
-rwxr-xr-x | scripts/yocto-compat-layer-wrapper | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/scripts/yocto-compat-layer-wrapper b/scripts/yocto-compat-layer-wrapper index db4b6871b8..b6baeb484e 100755 --- a/scripts/yocto-compat-layer-wrapper +++ b/scripts/yocto-compat-layer-wrapper | |||
@@ -13,13 +13,29 @@ if [ -z "$BUILDDIR" ]; then | |||
13 | exit 2 | 13 | exit 2 |
14 | fi | 14 | fi |
15 | 15 | ||
16 | # since we are using a temp directory, use the realpath for output | ||
17 | # log option | ||
18 | output_log='' | ||
19 | while getopts o: name | ||
20 | do | ||
21 | case $name in | ||
22 | o) output_log=$(realpath "$OPTARG") | ||
23 | esac | ||
24 | done | ||
25 | shift $(($OPTIND - 1)) | ||
26 | |||
27 | # generate a temp directory to run compat layer script | ||
16 | base_dir=$(realpath $BUILDDIR/../) | 28 | base_dir=$(realpath $BUILDDIR/../) |
17 | cd $base_dir | 29 | cd $base_dir |
18 | 30 | ||
19 | build_dir=$(mktemp -p $base_dir -d -t build-XXXX) | 31 | build_dir=$(mktemp -p $base_dir -d -t build-XXXX) |
20 | 32 | ||
21 | source oe-init-build-env $build_dir | 33 | source oe-init-build-env $build_dir |
22 | yocto-compat-layer.py "$@" | 34 | if [[ $output_log != '' ]]; then |
35 | yocto-compat-layer.py -o "$output_log" "$*" | ||
36 | else | ||
37 | yocto-compat-layer.py "$@" | ||
38 | fi | ||
23 | retcode=$? | 39 | retcode=$? |
24 | 40 | ||
25 | rm -rf $build_dir | 41 | rm -rf $build_dir |