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

Loading…
Cancel
Save