better progress bar for idd

This commit is contained in:
mollusk 2016-05-03 22:03:33 -07:00
parent 19b1bf3d21
commit 58ea883d03

4
idd.sh
View File

@ -57,7 +57,7 @@ case "$1" in
printf "${YELLOW}Writing${NC} ${LGREEN}${filepath}${NC} to ${LGREEN}/dev/${devname}${NC}\n" printf "${YELLOW}Writing${NC} ${LGREEN}${filepath}${NC} to ${LGREEN}/dev/${devname}${NC}\n"
printf "${LCYAN}Please wait ...${NC}\n" printf "${LCYAN}Please wait ...${NC}\n"
echo echo
dd if=${filepath} | pv | dd of=${DEVICEDIR}/${devname};sync pv -tpreb ${filepath} | dd of=${DEVICEDIR}/${devname};sync
printf "${LGREEN}Done writing file${NC}\n" printf "${LGREEN}Done writing file${NC}\n"
else else
echo "${0}: Please install 'pv' with your package manager" echo "${0}: Please install 'pv' with your package manager"
@ -100,7 +100,7 @@ case "$1" in
printf "${YELLOW}Writing${NC} ${LGREEN}${filepath}${NC} to ${LGREEN}/dev/${devname}${NC}\n" printf "${YELLOW}Writing${NC} ${LGREEN}${filepath}${NC} to ${LGREEN}/dev/${devname}${NC}\n"
printf "${LCYAN}Please wait ...${NC}\n" printf "${LCYAN}Please wait ...${NC}\n"
echo echo
dd if=${filepath} | pv | dd of=${DEVICEDIR}/${devname};sync pv -tpreb ${filepath} | dd of=${DEVICEDIR}/${devname};sync
printf "${LGREEN}Done writing file${NC}\n" printf "${LGREEN}Done writing file${NC}\n"
else else
echo "${0}: pv command not found in /usr/bin" echo "${0}: pv command not found in /usr/bin"