X-Git-Url: https://git.ayoreis.com/Adafruit_Blinka-hackapet.git/blobdiff_plain/181c0f8a5bc99fe85ab3f27fae85f8d0dfd6161b..c2bc4a90827f28abb6b51eae659a1f80a65c0497:/test/scripts/upload_feather_huzzah_circuitpython_put.sh diff --git a/test/scripts/upload_feather_huzzah_circuitpython_put.sh b/test/scripts/upload_feather_huzzah_circuitpython_put.sh index 709f1ba..3f6f74c 100755 --- a/test/scripts/upload_feather_huzzah_circuitpython_put.sh +++ b/test/scripts/upload_feather_huzzah_circuitpython_put.sh @@ -1,4 +1,7 @@ #!/bin/sh +# SPDX-FileCopyrightText: 2021 Melissa LeBlanc-Williams for Adafruit Industries +# +# SPDX-License-Identifier: MIT PORT=/dev/ttyUSB0 export MPYCROSS=`realpath ../../../circuitpython_2.2.3/mpy-cross/mpy-cross` @@ -35,4 +38,17 @@ do find . -type f -name '*.mpy' | \ xargs -n1 -I {} sh -c "echo uploading {} ...; ampy --port ${PORT} put {} {}" cd ../ -done \ No newline at end of file +done + +# switch to adafruit_blinka source +cd ../../src + +# create adafruit_blinka agnostic package for cross-platform logic +ampy --port $PORT mkdir --exists-okay adafruit_blinka +ampy --port $PORT mkdir --exists-okay adafruit_blinka/agnostic +# upload agnostic.mpy for platform detection +$MPYCROSS adafruit_blinka/agnostic/__init__.py +ampy --port $PORT put adafruit_blinka/agnostic/__init__.mpy adafruit_blinka/agnostic/__init__.mpy +# upload time.mpy for time logic +$MPYCROSS adafruit_blinka/agnostic/time.py +ampy --port $PORT put adafruit_blinka/agnostic/time.mpy adafruit_blinka/agnostic/time.mpy