File tree 2 files changed +12
-14
lines changed
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)
26
26
# 750ms to 1500ms seems to work on my Mac
27
27
# This is less critical now that we automatically retry dfu-util
28
28
29
- if ! " ${DIR} /upload-reset" " ${dummy_port_fullpath} " 750
30
- then
29
+ if ! " ${DIR} /upload-reset" " ${dummy_port_fullpath} " 750; then
31
30
echo " ****************************************" >&2
32
31
echo " * Could not automatically reset device *" >&2
33
32
echo " * Please manually reset device! *" >&2
36
35
fi
37
36
38
37
COUNTER=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 = $? ))
40
41
do
41
- if [ $ret -eq 74 ] && [ $(( -- COUNTER)) -gt 0 ]
42
- then
42
+ if [ $ret -eq 74 ] && [ $(( -- COUNTER)) -gt 0 ]; then
43
43
# I/O error, probably because no DFU device was found
44
44
echo " Trying ${COUNTER} more time(s)" >&2
45
45
sleep 1
@@ -56,8 +56,7 @@ while [ ! -r "${dummy_port_fullpath}" ] && ((COUNTER--)); do
56
56
sleep 0.1
57
57
done
58
58
59
- if [ $COUNTER -eq -1 ]
60
- then
59
+ if [ $COUNTER -eq -1 ]; then
61
60
echo " Timed out." >&2
62
61
exit 1
63
62
else
Original file line number Diff line number Diff line change @@ -26,8 +26,7 @@ DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
26
26
# 750ms to 1500ms seems to work on my Mac
27
27
# This is less critical now that we automatically retry dfu-util
28
28
29
- if ! " ${DIR} /upload-reset" " ${dummy_port_fullpath} " 750
30
- then
29
+ if ! " ${DIR} /upload-reset" " ${dummy_port_fullpath} " 750; then
31
30
echo " ****************************************" >&2
32
31
echo " * Could not automatically reset device *" >&2
33
32
echo " * Please manually reset device! *" >&2
36
35
fi
37
36
38
37
COUNTER=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 = $? ))
40
41
do
41
- if [ $ret -eq 74 ] && [ $(( -- COUNTER)) -gt 0 ]
42
- then
42
+ if [ $ret -eq 74 ] && [ $(( -- COUNTER)) -gt 0 ]; then
43
43
# I/O error, probably because no DFU device was found
44
44
echo " Trying ${COUNTER} more time(s)" >&2
45
45
sleep 1
@@ -56,8 +56,7 @@ while [ ! -r "${dummy_port_fullpath}" ] && ((COUNTER--)); do
56
56
sleep 0.1
57
57
done
58
58
59
- if [ $COUNTER -eq -1 ]
60
- then
59
+ if [ $COUNTER -eq -1 ]; then
61
60
echo " Timed out." >&2
62
61
exit 1
63
62
else
You can’t perform that action at this time.
0 commit comments