Skip to content
This repository has been archived by the owner on Apr 16, 2019. It is now read-only.

Commit

Permalink
simplify firmware-docker-build.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
prusnak committed Jul 7, 2014
1 parent 2707e8a commit 35d0aef
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions firmware-docker-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,15 @@

dirname $0

# Build trezor firmware
docker build . | tee firmware-docker-build.log
IMAGETAG=trezor-mcu-build
docker rmi $IMAGETAG || :
docker build -t $IMAGETAG .

# Parse image name
IMAGE=`grep "Successfully built" firmware-docker-build.log | tail -n1 | cut -d' ' -f3`
echo "IMAGE NAME: $IMAGE"
CONTAINERTAG=trezor-mcu-build
docker rm $CONTAINERTAG || :
docker run --name $CONTAINERTAG $IMAGETAG true

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 .
docker cp $CONTAINERTAG:/trezor-mcu/firmware/trezor.bin .

echo "---------------------"
echo "Firmware fingerprint:"
Expand Down

0 comments on commit 35d0aef

Please sign in to comment.