From 60840ca3e9efd380fde567f1618abff94fc6bb0f Mon Sep 17 00:00:00 2001 From: mollusk Date: Wed, 5 Sep 2018 13:36:34 -0700 Subject: [PATCH] idd.sh: Make blocksize setting var for dd Former-commit-id: 3ea465146955300170cafad3ee5e8f82677aed47 --- idd.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/idd.sh b/idd.sh index 1896f2a..2986275 100755 --- a/idd.sh +++ b/idd.sh @@ -1,5 +1,8 @@ #!/bin/bash +# DD Options +BLOCKSIZE="4" # in megabytes + # Paths MOUNTPATH="/mnt/mediadrive" DEVICEDIR="/dev" @@ -148,7 +151,7 @@ case "$1" in echo printf "${LCYAN}Please wait ...${NC}\n" echo - pv -tpreb ${filepath} | dd bs=1M of=${DEVICEDIR}/${devname} + pv -tpreb ${filepath} | dd bs=${BLOCKSIZE}M of=${DEVICEDIR}/${devname} echo printf "${YELLOW}Syncing buffers...${NC}\n";sync echo @@ -204,7 +207,7 @@ case "$1" in echo printf "${LCYAN}Please wait ...${NC}\n" echo - pv -tpreb ${filepath} | dd bs=1M of=${DEVICEDIR}/${devname} + pv -tpreb ${filepath} | dd bs=${BLOCKSIZE}M of=${DEVICEDIR}/${devname} echo printf "${YELLOW}Syncing buffers...${NC}\n";sync echo