mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-18 12:51:40 +00:00
[ general ] Proper SD card detection when trying to write it
This commit is contained in:
parent
e9562b1ff4
commit
2bdda536bb
1 changed files with 1 additions and 1 deletions
|
@ -595,7 +595,7 @@ create_image()
|
|||
[[ $(type -t post_build_image) == function ]] && post_build_image "$DEST/images/${version}.img"
|
||||
|
||||
# write image to SD card
|
||||
if [[ -e "$CARD_DEVICE" && -f $DEST/images/${version}.img && $COMPRESS_OUTPUTIMAGE != yes ]]; then
|
||||
if [[ $(lsblk "$CARD_DEVICE" 2>/dev/null) && -f $DEST/images/${version}.img && $COMPRESS_OUTPUTIMAGE != yes ]]; then
|
||||
display_alert "Writing image" "$CARD_DEVICE" "info"
|
||||
balena-etcher $DEST/images/${version}.img -d $CARD_DEVICE -y
|
||||
if [ $? -eq 0 ]; then
|
||||
|
|
Loading…
Add table
Reference in a new issue