summaryrefslogtreecommitdiffstats
path: root/import-layers/yocto-poky/scripts/contrib/ddimage
diff options
context:
space:
mode:
Diffstat (limited to 'import-layers/yocto-poky/scripts/contrib/ddimage')
-rwxr-xr-ximport-layers/yocto-poky/scripts/contrib/ddimage6
1 files changed, 5 insertions, 1 deletions
diff --git a/import-layers/yocto-poky/scripts/contrib/ddimage b/import-layers/yocto-poky/scripts/contrib/ddimage
index a503f11d0..ab929957a 100755
--- a/import-layers/yocto-poky/scripts/contrib/ddimage
+++ b/import-layers/yocto-poky/scripts/contrib/ddimage
@@ -100,5 +100,9 @@ if [ "$RESPONSE" != "y" ]; then
fi
echo "Writing image..."
-dd if="$IMAGE" of="$DEVICE" bs="$BLOCKSIZE"
+if which pv >/dev/null 2>&1; then
+ pv "$IMAGE" | dd of="$DEVICE" bs="$BLOCKSIZE"
+else
+ dd if="$IMAGE" of="$DEVICE" bs="$BLOCKSIZE"
+fi
sync
OpenPOWER on IntegriCloud