diff options
-rwxr-xr-x | scripts/contrib/ddimage | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/contrib/ddimage b/scripts/contrib/ddimage index a503f11d0d..ab929957a5 100755 --- a/scripts/contrib/ddimage +++ b/scripts/contrib/ddimage | |||
@@ -100,5 +100,9 @@ if [ "$RESPONSE" != "y" ]; then | |||
100 | fi | 100 | fi |
101 | 101 | ||
102 | echo "Writing image..." | 102 | echo "Writing image..." |
103 | dd if="$IMAGE" of="$DEVICE" bs="$BLOCKSIZE" | 103 | if which pv >/dev/null 2>&1; then |
104 | pv "$IMAGE" | dd of="$DEVICE" bs="$BLOCKSIZE" | ||
105 | else | ||
106 | dd if="$IMAGE" of="$DEVICE" bs="$BLOCKSIZE" | ||
107 | fi | ||
104 | sync | 108 | sync |