File tree Expand file tree Collapse file tree 2 files changed +12
-14
lines changed Expand file tree Collapse file tree 2 files changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,7 @@ DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
2626# 750ms to 1500ms seems to work on my Mac
2727# This is less critical now that we automatically retry dfu-util
2828
29- if ! " ${DIR} /upload-reset" " ${dummy_port_fullpath} " 750
30- then
29+ if ! " ${DIR} /upload-reset" " ${dummy_port_fullpath} " 750; then
3130 echo " ****************************************" >&2
3231 echo " * Could not automatically reset device *" >&2
3332 echo " * Please manually reset device! *" >&2
3635fi
3736
3837COUNTER=10
39- while " ${DIR} /dfu-util.sh" -d " ${usbID} " -a " ${altID} " -D " ${binfile} " ${dfuse_addr} -R ; (( ret= $? ))
38+ while
39+ " ${DIR} /dfu-util.sh" -d " ${usbID} " -a " ${altID} " -D " ${binfile} " ${dfuse_addr} -R
40+ (( ret = $? ))
4041do
41- if [ $ret -eq 74 ] && [ $(( -- COUNTER)) -gt 0 ]
42- then
42+ if [ $ret -eq 74 ] && [ $(( -- COUNTER)) -gt 0 ]; then
4343 # I/O error, probably because no DFU device was found
4444 echo " Trying ${COUNTER} more time(s)" >&2
4545 sleep 1
@@ -56,8 +56,7 @@ while [ ! -r "${dummy_port_fullpath}" ] && ((COUNTER--)); do
5656 sleep 0.1
5757done
5858
59- if [ $COUNTER -eq -1 ]
60- then
59+ if [ $COUNTER -eq -1 ]; then
6160 echo " Timed out." >&2
6261 exit 1
6362else
Original file line number Diff line number Diff line change @@ -26,8 +26,7 @@ DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
2626# 750ms to 1500ms seems to work on my Mac
2727# This is less critical now that we automatically retry dfu-util
2828
29- if ! " ${DIR} /upload-reset" " ${dummy_port_fullpath} " 750
30- then
29+ if ! " ${DIR} /upload-reset" " ${dummy_port_fullpath} " 750; then
3130 echo " ****************************************" >&2
3231 echo " * Could not automatically reset device *" >&2
3332 echo " * Please manually reset device! *" >&2
3635fi
3736
3837COUNTER=10
39- while " ${DIR} /dfu-util.sh" -d " ${usbID} " -a " ${altID} " -D " ${binfile} " ${dfuse_addr} -R ; (( ret= $? ))
38+ while
39+ " ${DIR} /dfu-util.sh" -d " ${usbID} " -a " ${altID} " -D " ${binfile} " ${dfuse_addr} -R
40+ (( ret = $? ))
4041do
41- if [ $ret -eq 74 ] && [ $(( -- COUNTER)) -gt 0 ]
42- then
42+ if [ $ret -eq 74 ] && [ $(( -- COUNTER)) -gt 0 ]; then
4343 # I/O error, probably because no DFU device was found
4444 echo " Trying ${COUNTER} more time(s)" >&2
4545 sleep 1
@@ -56,8 +56,7 @@ while [ ! -r "${dummy_port_fullpath}" ] && ((COUNTER--)); do
5656 sleep 0.1
5757done
5858
59- if [ $COUNTER -eq -1 ]
60- then
59+ if [ $COUNTER -eq -1 ]; then
6160 echo " Timed out." >&2
6261 exit 1
6362else
You can’t perform that action at this time.
0 commit comments