mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-21 05:48:23 +00:00
b0e879b30e
fixes #417
20 lines
429 B
Bash
Executable File
20 lines
429 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
BOOTLOADER_COMMIT=${1:-HEAD}
|
|
FIRMWARE_COMMIT=${2:-HEAD}
|
|
|
|
if [ "$BOOTLOADER_COMMIT" = "EMU" ]; then
|
|
export EMULATOR=1
|
|
fi
|
|
|
|
if [ "$EMULATOR" = 1 ]; then
|
|
IMAGE=trezor-mcu-emulator
|
|
else
|
|
IMAGE=trezor-mcu-build
|
|
fi
|
|
|
|
docker build -t "$IMAGE" --build-arg EMULATOR=$EMULATOR .
|
|
docker run -it -v $(pwd):/src:z --user="$(stat -c "%u:%g" .)" "$IMAGE" \
|
|
/src/script/fullbuild "$BOOTLOADER_COMMIT" "$FIRMWARE_COMMIT"
|