diff options
Diffstat (limited to 'modules/sd_card_image/postimage.50.makezd.sh')
-rw-r--r-- | modules/sd_card_image/postimage.50.makezd.sh | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/modules/sd_card_image/postimage.50.makezd.sh b/modules/sd_card_image/postimage.50.makezd.sh index dc605ea..50be9a0 100644 --- a/modules/sd_card_image/postimage.50.makezd.sh +++ b/modules/sd_card_image/postimage.50.makezd.sh @@ -37,19 +37,13 @@ function make_zd() { } -found=0 -oIFS=$IFS -IFS=$'\n' -for line in $(env); do - [[ "${line:0:24}" == "CFG_sd_card_image__size_" ]] || continue - vals=${line#*=} +find_option_values sizes sd_card_image size +for vals in "${sizes[@]}"; do disk_size=${vals%,*} ext= expr index "$vals" ',' &>/dev/null && ext=${vals#*,} make_zd $ext - found=1 done -IFS=$oIFS # When no size options were specified, we make a default image. -[ "$found" = "1" ] || make_zd +[[ ${#sizes[@]} == 0 ]] && make_zd |