Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: image_to_usb.sh

Issue 3581007: crosutils: Improve dd to usb in image_to_usb.sh (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: image_to_usb.sh
diff --git a/image_to_usb.sh b/image_to_usb.sh
index f40e57a4a3e798304003cfa26ae8e9f438c1038f..81a3ab58dddab0523cfd0430fecf9ea022a55062 100755
--- a/image_to_usb.sh
+++ b/image_to_usb.sh
@@ -236,7 +236,11 @@ then
if [ ${FLAGS_install} -ne ${FLAGS_TRUE} ]; then
echo "Copying ${SRC_IMAGE} to ${FLAGS_to}..."
- sudo dd if="${SRC_IMAGE}" of="${FLAGS_to}" bs=4M
+ if type pv >/dev/null 2>&1; then
Kenneth Waters 2010/10/01 17:16:25 Remove this conditional, keep only the pv branch,
+ sudo pv -ptre "${SRC_IMAGE}" | sudo dd of="${FLAGS_to}" bs=4M oflag=sync
+ else
+ sudo dd if="${SRC_IMAGE}" of="${FLAGS_to}" bs=4M oflag=sync
+ fi
sync
else
if [ ${INSIDE_CHROOT} -ne 1 ]; then
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698