circuitpack/build_package.sh

18 lines
572 B
Bash

#!/bin/sh
# build_package.sh - build a CircuitPack package for CircuitPack
# Requires mpy-cross installed in $PATH
mpy-cross 2>/dev/null
if [ "$?" = 127 ]; then
echo 'error: `mpy-cross` must be installed; get it from the link below and install it in a directory in your $PATH' >&2
echo 'https://learn.adafruit.com/welcome-to-circuitpython/library-file-types-and-frozen-libraries#creating-an-mpy-file-3118108' >&2
exit 2
fi
rm -rf board
mkdir -p board/lib
mpy-cross circuitpack.py
mv circuitpack.mpy board/lib/
python3 cppack.py circuitpack board
rm -r board