Skip to content

Commit 51eab0f

Browse files
committed
[maple_upload] Run shfmt
1 parent 07a2620 commit 51eab0f

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

linux/maple_upload.sh

+6-7
Original file line numberDiff line numberDiff 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
@@ -36,10 +35,11 @@ then
3635
fi
3736

3837
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 = $?))
4041
do
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
5757
done
5858

59-
if [ $COUNTER -eq -1 ]
60-
then
59+
if [ $COUNTER -eq -1 ]; then
6160
echo " Timed out." >&2
6261
exit 1
6362
else

macosx/maple_upload.sh

+6-7
Original file line numberDiff line numberDiff 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
@@ -36,10 +35,11 @@ then
3635
fi
3736

3837
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 = $?))
4041
do
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
5757
done
5858

59-
if [ $COUNTER -eq -1 ]
60-
then
59+
if [ $COUNTER -eq -1 ]; then
6160
echo " Timed out." >&2
6261
exit 1
6362
else

0 commit comments

Comments
 (0)