Convenience scripts
This commit is contained in:
parent
7ecd9519c2
commit
db1c918e22
1
.deploy/repl.sh
Executable file
1
.deploy/repl.sh
Executable file
@ -0,0 +1 @@
|
||||
screen /dev/tty.usbmo* 115200
|
||||
26
.deploy/send-it.sh
Executable file
26
.deploy/send-it.sh
Executable file
@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
set -eiu -o pipefail
|
||||
|
||||
DEST=/volumes/CIRCUITPY
|
||||
|
||||
# take the param, strip the filename.
|
||||
source="$1"
|
||||
support_files="${@:2}"
|
||||
sourcebase="$(basename $source)"
|
||||
# get the filename without the extension.
|
||||
module="${sourcebase%.py}"
|
||||
|
||||
# empty code.py
|
||||
echo "" >${DEST}/code.py
|
||||
|
||||
# send the file
|
||||
cp ${source} ${DEST}/${sourcebase}
|
||||
|
||||
# make a code.py
|
||||
echo "import ${module}" >${DEST}/code.py
|
||||
|
||||
if [ -n "${support_files}" ]; then
|
||||
for file in ${support_files}; do
|
||||
cp "$file" "${DEST}/$(basename "${file}")"
|
||||
done
|
||||
fi
|
||||
Loading…
x
Reference in New Issue
Block a user