X-Git-Url: https://git.ayoreis.com/Adafruit_Blinka-hackapet.git/blobdiff_plain/1a34b126463f06f6a09fa3cff69b311d6101fb83..ebd564d6aea7704a2fd6e2635f49cf7a6795d85d:/python/upload_feather_huzzah_micropython_put.sh?ds=inline diff --git a/python/upload_feather_huzzah_micropython_put.sh b/python/upload_feather_huzzah_micropython_put.sh index 3a6cb0e..2b7537d 100755 --- a/python/upload_feather_huzzah_micropython_put.sh +++ b/python/upload_feather_huzzah_micropython_put.sh @@ -2,7 +2,9 @@ PORT=/dev/ttyUSB0 # filter directories, and create relevant ones on the board -find . -mindepth 1 -type d | grep -v -E "(.(git|idea|vscode)|__pycache__)" | xargs -n1 ampy --port ${PORT} mkdir +find . -type d -mindepth 1 | \ + grep -v -E "(.(git|idea|vscode)|__pycache__)" | \ + xargs -n1 -I {} sh -c "echo Creating directory {} ...; ampy --port ${PORT} mkdir --exists-okay {}" # put top-level modules in place for NAME in agnostic unittest @@ -16,3 +18,19 @@ for NAME in board digitalio mcp microcontroller testing do find ${NAME} -name '*.py'| xargs -n1 -I {} sh -c "echo Copying {} ...; ampy --port ${PORT} put {} {}" done + +cd ../../ # change into folder containing repo + +# I2C dependencies +echo "Copying module adafruit_bus_device..." +cd Adafruit_CircuitPython_BusDevice # change into different repo +ampy --port ${PORT} mkdir --exists-okay adafruit_bus_device +ampy --port ${PORT} put adafruit_bus_device/__init__.py adafruit_bus_device/__init__.py +ampy --port ${PORT} put adafruit_bus_device/i2c_device.py adafruit_bus_device/i2c_device.py +cd ../ + +# BME280 dependencies +echo "Copying module adafruit_bme..." +cd Adafruit_CircuitPython_BME280 # change into different repo +ampy --port ${PORT} put adafruit_bme280.py adafruit_bme280.py +cd ../