Skip to content
Permalink
Browse files

Update bn-image-creator.

Generate zip directly to reduce local storage requirement.

Signed-off-by: Bofu Chen (bafu) <bofu@dt42.io>
  • Loading branch information...
bafu committed Jul 15, 2019
1 parent 35107f6 commit 560db3177da6de1c12b827b8c75fbaa59cb74d4a
Showing with 3 additions and 6 deletions.
  1. +3 −6 utils/bn-image-creator.sh
@@ -38,13 +38,10 @@ CTIME_YY=`date '+%Y'`
CTIME_MM=`date '+%m'`
CTIME_DD=`date '+%d'`

IMAGE_FILENAME=$CTIME_YY-$CTIME_MM-$CTIME_DD-raspbian-stretch-berrynet
IMAGE_FILENAME=$CTIME_YY-$CTIME_MM-$CTIME_DD-raspbian-buster-berrynet

echo "Creating image ${IMAGE_FILENAME}.img"
sudo dd if="$DEVICE" of="$IMAGE_FILENAME".img bs=512 status=progress

echo "Compressing image to ${IMAGE_FILENAME}.zip"
zip "$IMAGE_FILENAME".zip "$IMAGE_FILENAME".img
echo "Creating image ${IMAGE_FILENAME}.zip"
sudo bash -c "dd if="$DEVICE" bs=512 status=progress | zip ${IMAGE_FILENAME}.zip -"

echo "BerryNet release image has been created."
echo "Now you can upload the image to the release repository."

0 comments on commit 560db31

Please sign in to comment.
You can’t perform that action at this time.