1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-26 09:28:13 +00:00
trezor-firmware/firmware-docker-build.sh
2014-06-19 02:31:07 +02:00

24 lines
515 B
Bash
Executable File

#!/bin/bash
dirname $0
# Build trezor firmware
docker build . | tee firmware-docker-build.log
# Parse image name
IMAGE=`grep "Successfully built" firmware-docker-build.log | tail -n1 | cut -d' ' -f3`
echo "IMAGE NAME: $IMAGE"
docker run -t $IMAGE true
# Parse container name
CONTAINER=`docker ps -a | grep true | head -n1 | cut -d' ' -f1`
echo "CONTAINER NAME: $CONTAINER"
docker cp $CONTAINER:/trezor-mcu/firmware/trezor.bin .
echo "---------------------"
echo "Firmware fingerprint:"
sha256sum trezor.bin