Skip to content

Commit ead2803

Browse files
committed
Add open command
1 parent 3a8580f commit ead2803

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

circuitpython_tools.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Collection of tools to make working with CircuitPython boards easier.
88
99
Usage:
1010
$(basename $0) -h # show this message
11+
$(basename $0) open # open USB device in Finder
1112
$(basename $0) build # make _build folder, ready for deployment
1213
$(basename $0) deploy # actually deploy ^ to device
1314
$(basename $0) watch # watch for changes to automatically build and deploy
@@ -91,6 +92,10 @@ function _eject() {
9192
diskutil eject CIRCUITPY
9293
}
9394

95+
function _open() {
96+
open "$device"
97+
}
98+
9499
if [ -z "$COMMAND" ]; then
95100
help
96101
exit
@@ -106,6 +111,8 @@ fi
106111

107112
if [ "$COMMAND" == "build" ]; then
108113
_build
114+
elif [ "$COMMAND" == "open" ]; then
115+
_open
109116
elif [ "$COMMAND" == "deploy" ]; then
110117
_deploy
111118
elif [ "$COMMAND" == "watch" ]; then

0 commit comments

Comments
 (0)