File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ checkExecutable "arduino-cloud-cli"
17
17
checkExecutable " jq"
18
18
checkExecutable " sort"
19
19
checkExecutable " uniq"
20
+ checkExecutable " paste"
20
21
21
22
# Default wait time for OTA process to complete
22
23
waittime=600
@@ -71,6 +72,20 @@ while [ $waittime -gt 0 ]; do
71
72
echo " Waiting for $waittime seconds for OTA process to complete..."
72
73
sleep 15
73
74
waittime=$(( waittime- 15 ))
75
+ # Check status of running processess...
76
+ otastatusout=$( arduino-cloud-cli ota status --ota-ids $otaids --format json | grep in_progress | wc -l)
77
+ if [ " $otastatusout " -eq 0 ]; then
78
+ break
79
+ fi
74
80
done
75
81
82
+ echo " "
83
+ echo " Status report:"
84
+ arduino-cloud-cli ota status --ota-ids $otaids
85
+
86
+ if [ $waittime -le 0 ]; then
87
+ echo " OTA process did not complete within the specified time for some boards"
88
+ exit 1
89
+ fi
90
+
76
91
exit 0
You can’t perform that action at this time.
0 commit comments