blob: 537eae684c4c06e751a6ab3bd6e74b0ec238b712 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#!/bin/bash
RED='\033[0;101m'
GREEN='\033[1;32m'
END='\033[0m'
while [ true ] ; do
echo "Waiting for board"
false
while [ true ] ; do
stat /Volumes/WATCHBOOT &> /dev/null
if [ $? -eq 0 ]
then
break
fi
sleep 0.5
done
sleep 0.5
clear
cp ./standard-green.uf2 /Volumes/WATCHBOOT/
if [ $? -eq 0 ]
then
echo -e "${GREEN}Success!${END} Board flashed successfully!"
else
echo -e "${RED}FAILURE:${END} Board did not flash successfully."
echo -ne '\a'
echo -ne '\a'
fi
while [ true ] ; do
stat /Volumes/WATCHBOOT &> /dev/null
if [ $? -eq 0 ]
then
sleep 0.5
else
break
fi
done
echo -ne '\a'
done
|