1#!/bin/sh
2# SPDX-License-Identifier: BSD-3-Clause
3# Copyright(c) 2018 Intel Corporation. All rights reserved.
4
5# Runs a given script in the docker container you can generate from the
6# docker_build directory.
7# Example:
8#  To build sof for baytrail:
9#  ./scripts/docker-run.sh ./scripts/xtensa-build-all.sh byt
10#  To build topology:
11#  ./scripts/docker-run.sh ./scripts/build-tools.sh
12
13# set -x
14
15if tty --quiet; then
16    SOF_DOCKER_RUN="$SOF_DOCKER_RUN --tty"
17fi
18
19docker run -i -v "$(pwd)":/home/sof/work/sof.git \
20	--env CMAKE_BUILD_TYPE \
21	--env PRIVATE_KEY_OPTION \
22	--env http_proxy="$http_proxy" \
23	--env https_proxy="$https_proxy" \
24	--user "$(id -u)" \
25	$SOF_DOCKER_RUN \
26	sof "$@"
27