Skip to content

Commit

Permalink
bmap-writer-stream: handle bmap dl error
Browse files Browse the repository at this point in the history
  • Loading branch information
embetrix committed Jan 30, 2025
1 parent 3c3133e commit dddd46b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bmap-writer-stream.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ BMAP_FILE=$(echo "$BMAP_URL" | sed 's/.*\///')
BMAP_FILE="${BMAP_FILE}_"
echo "Downloading $BMAP_URL to $BMAP_FILE"
$WGET -q $BMAP_URL -O $BMAP_FILE
if [ $? -ne 0 ]; then
echo "Failed to download $BMAP_URL"
exit 1
fi
echo "Streaming $IMAGE_URL to $DEVICE"
$WGET -q $IMAGE_URL -O - | $BMAP_WRITER - $BMAP_FILE $DEVICE

0 comments on commit dddd46b

Please sign in to comment.