diff --git a/.deploy/repl.sh b/.deploy/repl.sh index 6cff5ef..a778449 100755 --- a/.deploy/repl.sh +++ b/.deploy/repl.sh @@ -1 +1,2 @@ +#!/bin/bash screen /dev/tty.usbmo* 115200 diff --git a/.deploy/send-it.sh b/.deploy/send-it.sh index 00d5f04..52e71f3 100755 --- a/.deploy/send-it.sh +++ b/.deploy/send-it.sh @@ -5,8 +5,8 @@ DEST=/volumes/CIRCUITPY # take the param, strip the filename. source="$1" -support_files="${@:2}" -sourcebase="$(basename $source)" +support_files=( "${@:2}" ) +sourcebase="$(basename "$source")" # get the filename without the extension. module="${sourcebase%.py}" @@ -14,13 +14,13 @@ module="${sourcebase%.py}" echo "" >${DEST}/code.py # send the file -cp ${source} ${DEST}/${sourcebase} +cp "${source}" "${DEST}/${sourcebase}" # make a code.py -echo "import ${module}" >${DEST}/code.py +echo "import ${module}" >"${DEST}/code.py" -if [ -n "${support_files}" ]; then - for file in ${support_files}; do +if [ -n "${support_files[*]}" ]; then + for file in "${support_files[@]}"; do cp "$file" "${DEST}/$(basename "${file}")" done -fi \ No newline at end of file +fi diff --git a/.deploy/setup-libraries.sh b/.deploy/setup-libraries.sh new file mode 100755 index 0000000..3a87678 --- /dev/null +++ b/.deploy/setup-libraries.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -eiu -o pipefail + +DEST=/volumes/CIRCUITPY +LIBRARY_SRC=/Users/danielstaple/git_work/projects_in_cloud/book_authoring/book-research/pico-book-research/circuitpython/3rdparty/built/adafruit-circuitpython-bundle-7.x-mpy-20220228 + +FILES=(adafruit_pioasm.mpy adafruit_requests.mpy adafruit_vl53l1x.mpy) +FOLDERS=(adafruit_wsgi adafruit_esp32spi) + +for file in "${FILES[@]}"; do + cp -v "${LIBRARY_SRC}/lib/${file}" "${DEST}/lib/${file}" +done + +for folder in "${FOLDERS[@]}"; do + rsync -rv "${LIBRARY_SRC}/lib/${folder}" "${DEST}/lib/${folder}" +done