2018-04-08 00:13:46 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
2019-04-18 12:52:24 +00:00
|
|
|
cd "$(dirname $0)/.."
|
|
|
|
|
2018-06-25 16:09:52 +00:00
|
|
|
BOOTLOADER_COMMIT=${1:-HEAD}
|
|
|
|
FIRMWARE_COMMIT=${2:-HEAD}
|
2019-04-25 12:11:37 +00:00
|
|
|
IMAGE=trezor-mcu-build
|
2019-09-04 10:16:55 +00:00
|
|
|
BITCOIN_ONLY=${BITCOIN_ONLY:-0}
|
2018-10-11 12:58:22 +00:00
|
|
|
|
2019-04-18 12:52:24 +00:00
|
|
|
USER=$(ls -lnd . | awk '{ print $3 }')
|
|
|
|
GROUP=$(ls -lnd . | awk '{ print $4 }')
|
|
|
|
|
2019-04-27 17:16:50 +00:00
|
|
|
docker build -t "$IMAGE" ci/
|
2019-09-04 10:16:55 +00:00
|
|
|
docker run -it -v $(pwd):/src:z --env BITCOIN_ONLY="$BITCOIN_ONLY" --user="$USER:$GROUP" "$IMAGE" \
|
2019-04-18 12:52:24 +00:00
|
|
|
/src/legacy/script/fullbuild "$BOOTLOADER_COMMIT" "$FIRMWARE_COMMIT"
|