hypriot / flash

Command line script to flash SD card images of any kind
MIT License
1k stars 176 forks source link

pv does not display progress correctly on Linux #75

Closed davidjmurray closed 5 years ago

davidjmurray commented 8 years ago

On: Linux Mint 17.1 Xfce

The syntax of the pv and dd command may function better as per method 1 on: https://askubuntu.com/questions/215505/how-do-you-monitor-the-progress-of-dd

So, the line in flash: pv -s "${size}" < "${image}" | sudo dd bs=1M "of=${disk}"

could be: dd if="${image}" status=none | pv -s "${size}" | dd bs=1M of="${disk}" echo "Done."

As there is a pause before dd finishes completely, status update of 'Done' maybe useful also.

Cheers,