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
|
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-25 12:11:37 +00:00
|
|
|
docker build -t "$IMAGE" .
|
2019-04-18 12:52:24 +00:00
|
|
|
docker run -it -v $(pwd):/src:z --user="$USER:$GROUP" "$IMAGE" \
|
|
|
|
/src/legacy/script/fullbuild "$BOOTLOADER_COMMIT" "$FIRMWARE_COMMIT"
|