idd.sh: Make blocksize setting var for dd

Former-commit-id: 3ea465146955300170cafad3ee5e8f82677aed47
This commit is contained in:
mollusk 2018-09-05 13:36:34 -07:00
parent e66bcb5030
commit 60840ca3e9

7
idd.sh
View File

@ -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