4 # filter directories, and create relevant ones on the board
5 find . -type d -mindepth 1 | \
6 grep -v -E "(.(git|idea|vscode)|__pycache__)" | \
7 xargs -n1 -I {} sh -c "echo Creating directory {} ...; ampy --port ${PORT} mkdir --exists-okay {}"
9 # put top-level modules in place
10 for NAME in agnostic unittest
12 echo "Copying ${NAME}.py ..."
13 ampy --port ${PORT} put ${NAME}.py ${NAME}.py
16 # recursively sync folders of nested packages
17 for NAME in board digitalio mcp microcontroller testing
19 find ${NAME} -name '*.py'| xargs -n1 -I {} sh -c "echo Copying {} ...; ampy --port ${PORT} put {} {}"
22 cd ../../ # change into folder containing repo
25 echo "Copying module adafruit_bus_device..."
26 cd Adafruit_CircuitPython_BusDevice # change into different repo
27 ampy --port ${PORT} mkdir --exists-okay adafruit_bus_device
28 ampy --port ${PORT} put adafruit_bus_device/__init__.py adafruit_bus_device/__init__.py
29 ampy --port ${PORT} put adafruit_bus_device/i2c_device.py adafruit_bus_device/i2c_device.py
33 echo "Copying module adafruit_bme..."
34 cd Adafruit_CircuitPython_BME280 # change into different repo
35 ampy --port ${PORT} put adafruit_bme280.py adafruit_bme280.py