This repository was archived by the owner on Aug 5, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -21,13 +21,19 @@ DYLD_LIBRARY_PATH=$fixed_path
21
21
DFU=$fixed_path /dfu-util
22
22
23
23
echo " wating for device... "
24
- f=` DYLD_LIBRARY_PATH=$fixed_path $DFU -l | grep 8087:0a99 | grep sensor_core | cut -f 1 -d ' ' `
25
- while [ " x$f " = " x" ]
24
+ COUNTER=0
25
+ f=` DYLD_LIBRARY_PATH=$fixed_path $DFU -l -d8087:0a99 | grep sensor_core | cut -f 1 -d ' ' `
26
+ while [ " x$f " = " x" ] && [ $COUNTER -lt 10 ]
26
27
do
28
+ let COUNTER=COUNTER+1
27
29
sleep 1
28
30
echo $DFU
29
- f=` DYLD_LIBRARY_PATH=$fixed_path $DFU -l | grep 8087 :0a99 | grep sensor_core | cut -f 1 -d ' ' `
31
+ f=` DYLD_LIBRARY_PATH=$fixed_path $DFU -l -d8087 :0a99 | grep sensor_core | cut -f 1 -d ' ' `
30
32
done
31
33
32
- echo " Using dfu-util to send " $bin_file_name
33
- DYLD_LIBRARY_PATH=$fixed_path $DFU -d8087:0a99 -D $bin_file_name -v --alt 7 -R
34
+ if [ " x$f " != " x" ] ; then
35
+ echo " Using dfu-util to send " $bin_file_name
36
+ DYLD_LIBRARY_PATH=$fixed_path $DFU -d8087:0a99 -D $bin_file_name -v --alt 7 -R
37
+ else
38
+ echo " ERROR: Timed out waiting for Intel EDU."
39
+ fi
You can’t perform that action at this time.
0 commit comments