Merge pull request #472 from keyboardio/f/reorg-examples

Reorganize our examples directory to try to make it easier to work with
pull/474/head
Gergely Nagy 6 years ago committed by GitHub
commit ac434360c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -249,12 +249,19 @@ compile () {
_find_all () {
for plugin in ./*.ino \
examples/* \
$([ -d examples ] && find examples -name '*.ino') \
src/*.ino; do
if [ -d "$(dirname "${plugin}")" ] || [ -f "${plugin}" ]; then
p="$(basename "${plugin}" .ino)"
if [ "${p}" != '*' ]; then
case "${plugin}" in
examples/*/${p}/${p}.ino)
echo "${plugin}" | sed -e "s,examples/,," | sed -e "s,/${p}\\.ino,,"
;;
*)
echo "${p}"
;;
esac
fi
fi
done | sort
@ -497,6 +504,12 @@ done
LIBRARY="${SKETCH}"
case "${SKETCH}" in
*/*)
SKETCH="$(basename "${SKETCH}")"
;;
esac
export SKETCH
export LIBRARY

Loading…
Cancel
Save