File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ port=$(ls /dev/tty.usb*)
30
30
device=" /Volumes/CIRCUITPY"
31
31
subject=" main.py" # TODO: parameterize
32
32
33
- function build () {
33
+ function _build () {
34
34
rm -rf " _build/"
35
35
mkdir " _build/"
36
36
@@ -55,8 +55,8 @@ function build() {
55
55
fi
56
56
}
57
57
58
- function deploy () {
59
- build
58
+ function _deploy () {
59
+ _build
60
60
61
61
# Sync subject
62
62
rsync \
@@ -71,23 +71,23 @@ function deploy() {
71
71
" $device /lib"
72
72
}
73
73
74
- function watch () {
74
+ function _watch () {
75
75
fsw -0 . | while read -d " " path
76
76
do
77
77
FILENAME=$( basename $path )
78
78
79
79
if [ " $FILENAME " == " $subject " ]; then
80
- deploy
80
+ _deploy
81
81
fi
82
82
done
83
83
}
84
84
85
- function serial () {
85
+ function _serial () {
86
86
NAME=" cpt_serial"
87
87
screen -r " $NAME " || screen -S " $NAME " " $port " 115200
88
88
}
89
89
90
- function eject () {
90
+ function _eject () {
91
91
diskutil eject CIRCUITPY
92
92
}
93
93
@@ -105,15 +105,15 @@ else
105
105
fi
106
106
107
107
if [ " $COMMAND " == " build" ]; then
108
- build
108
+ _build
109
109
elif [ " $COMMAND " == " deploy" ]; then
110
- deploy
110
+ _deploy
111
111
elif [ " $COMMAND " == " watch" ]; then
112
- watch
112
+ _watch
113
113
elif [ " $COMMAND " == " serial" ]; then
114
- serial
114
+ _serial
115
115
elif [ " $COMMAND " == " eject" ]; then
116
- eject
116
+ _eject
117
117
else
118
118
echo " Unkown command: $COMMAND "
119
119
fi
You can’t perform that action at this time.
0 commit comments