]> Repositories - Adafruit_Blinka-hackapet.git/blob - python/upload_feather_huzzah_micropython_put.sh
led_hardwired flag to skip interactive questioning about wiring LEDs
[Adafruit_Blinka-hackapet.git] / python / upload_feather_huzzah_micropython_put.sh
1 #!/bin/sh
2 PORT=/dev/ttyUSB0
3
4 # filter directories, and create relevant ones on the board
5 find . -mindepth 1 -type d | grep -v -E "(.(git|idea|vscode)|__pycache__)" | xargs -n1 ampy --port ${PORT} mkdir
6
7 # put top-level modules in place
8 for NAME in agnostic unittest
9 do
10     echo "Copying ${NAME}.py ..."
11     ampy --port ${PORT} put ${NAME}.py ${NAME}.py
12 done
13
14 # recursively sync folders of nested packages
15 for NAME in board digitalio mcp microcontroller testing
16 do
17     find ${NAME} -name '*.py'| xargs -n1 -I {} sh -c "echo Copying {} ...; ampy --port ${PORT} put {} {}"
18 done