2017-11-04 00:56:05 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
IMAGE=trezor-core-build
|
|
|
|
TAG=${1:-master}
|
2018-07-01 18:17:20 +00:00
|
|
|
REPOSITORY=${2:-trezor}
|
|
|
|
|
|
|
|
if [ "$REPOSITORY" = "local" ]; then
|
|
|
|
REPOSITORY=file:///local/
|
|
|
|
else
|
|
|
|
REPOSITORY=https://github.com/$REPOSITORY/trezor-core.git
|
|
|
|
fi
|
2017-11-04 00:56:05 +00:00
|
|
|
|
|
|
|
docker build -t $IMAGE .
|
2018-01-09 20:44:42 +00:00
|
|
|
|
2018-07-01 18:17:20 +00:00
|
|
|
docker run -t -v $(pwd):/local -v $(pwd)/build-docker:/build:z $IMAGE /bin/sh -c "\
|
|
|
|
git clone $REPOSITORY trezor-core && \
|
2017-11-04 00:56:05 +00:00
|
|
|
cd trezor-core && \
|
|
|
|
ln -s /build build &&
|
|
|
|
git checkout $TAG && \
|
|
|
|
git submodule update --init --recursive && \
|
2018-01-31 13:45:02 +00:00
|
|
|
make clean vendor build_boardloader build_bootloader build_prodtest build_firmware"
|