diff --git a/bin/kaleidoscope-builder b/bin/kaleidoscope-builder index da1680f8..52c83ff1 100755 --- a/bin/kaleidoscope-builder +++ b/bin/kaleidoscope-builder @@ -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 - 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 done | sort @@ -497,6 +504,12 @@ done LIBRARY="${SKETCH}" +case "${SKETCH}" in + */*) + SKETCH="$(basename "${SKETCH}")" + ;; +esac + export SKETCH export LIBRARY diff --git a/examples/Atreus/.kaleidoscope-builder.conf b/examples/Devices/Atreus/.kaleidoscope-builder.conf similarity index 100% rename from examples/Atreus/.kaleidoscope-builder.conf rename to examples/Devices/Atreus/.kaleidoscope-builder.conf diff --git a/examples/Atreus/Atreus.ino b/examples/Devices/Atreus/Atreus.ino similarity index 100% rename from examples/Atreus/Atreus.ino rename to examples/Devices/Atreus/Atreus.ino diff --git a/examples/Atreus/Makefile b/examples/Devices/Atreus/Makefile similarity index 100% rename from examples/Atreus/Makefile rename to examples/Devices/Atreus/Makefile diff --git a/examples/ErgoDox/.kaleidoscope-builder.conf b/examples/Devices/ErgoDox/.kaleidoscope-builder.conf similarity index 100% rename from examples/ErgoDox/.kaleidoscope-builder.conf rename to examples/Devices/ErgoDox/.kaleidoscope-builder.conf diff --git a/examples/ErgoDox/ErgoDox.ino b/examples/Devices/ErgoDox/ErgoDox.ino similarity index 100% rename from examples/ErgoDox/ErgoDox.ino rename to examples/Devices/ErgoDox/ErgoDox.ino diff --git a/examples/Kaleidoscope/Kaleidoscope.ino b/examples/Devices/Keyboardio/Kaleidoscope/Kaleidoscope.ino similarity index 100% rename from examples/Kaleidoscope/Kaleidoscope.ino rename to examples/Devices/Keyboardio/Kaleidoscope/Kaleidoscope.ino diff --git a/examples/Planck/.kaleidoscope-builder.conf b/examples/Devices/Planck/.kaleidoscope-builder.conf similarity index 100% rename from examples/Planck/.kaleidoscope-builder.conf rename to examples/Devices/Planck/.kaleidoscope-builder.conf diff --git a/examples/Planck/Makefile b/examples/Devices/Planck/Makefile similarity index 100% rename from examples/Planck/Makefile rename to examples/Devices/Planck/Makefile diff --git a/examples/Planck/Planck.ino b/examples/Devices/Planck/Planck.ino similarity index 100% rename from examples/Planck/Planck.ino rename to examples/Devices/Planck/Planck.ino diff --git a/examples/AppSwitcher/AppSwitcher.ino b/examples/Features/AppSwitcher/AppSwitcher.ino similarity index 100% rename from examples/AppSwitcher/AppSwitcher.ino rename to examples/Features/AppSwitcher/AppSwitcher.ino diff --git a/examples/AppSwitcher/Macros.cpp b/examples/Features/AppSwitcher/Macros.cpp similarity index 100% rename from examples/AppSwitcher/Macros.cpp rename to examples/Features/AppSwitcher/Macros.cpp diff --git a/examples/AppSwitcher/Macros.h b/examples/Features/AppSwitcher/Macros.h similarity index 100% rename from examples/AppSwitcher/Macros.h rename to examples/Features/AppSwitcher/Macros.h diff --git a/examples/CycleTimeReport/CycleTimeReport.ino b/examples/Features/CycleTimeReport/CycleTimeReport.ino similarity index 100% rename from examples/CycleTimeReport/CycleTimeReport.ino rename to examples/Features/CycleTimeReport/CycleTimeReport.ino diff --git a/examples/EEPROM-Keymap-Programmer/EEPROM-Keymap-Programmer.ino b/examples/Features/EEPROM/EEPROM-Keymap-Programmer/EEPROM-Keymap-Programmer.ino similarity index 100% rename from examples/EEPROM-Keymap-Programmer/EEPROM-Keymap-Programmer.ino rename to examples/Features/EEPROM/EEPROM-Keymap-Programmer/EEPROM-Keymap-Programmer.ino diff --git a/examples/EEPROM-Keymap/EEPROM-Keymap.ino b/examples/Features/EEPROM/EEPROM-Keymap/EEPROM-Keymap.ino similarity index 100% rename from examples/EEPROM-Keymap/EEPROM-Keymap.ino rename to examples/Features/EEPROM/EEPROM-Keymap/EEPROM-Keymap.ino diff --git a/examples/EEPROM-Settings/EEPROM-Settings.ino b/examples/Features/EEPROM/EEPROM-Settings/EEPROM-Settings.ino similarity index 100% rename from examples/EEPROM-Settings/EEPROM-Settings.ino rename to examples/Features/EEPROM/EEPROM-Settings/EEPROM-Settings.ino diff --git a/examples/FocusSerial/FocusSerial.ino b/examples/Features/FocusSerial/FocusSerial.ino similarity index 100% rename from examples/FocusSerial/FocusSerial.ino rename to examples/Features/FocusSerial/FocusSerial.ino diff --git a/examples/HostOS/HostOS.ino b/examples/Features/HostOS/HostOS.ino similarity index 100% rename from examples/HostOS/HostOS.ino rename to examples/Features/HostOS/HostOS.ino diff --git a/examples/HostPowerManagement/HostPowerManagement.ino b/examples/Features/HostPowerManagement/HostPowerManagement.ino similarity index 100% rename from examples/HostPowerManagement/HostPowerManagement.ino rename to examples/Features/HostPowerManagement/HostPowerManagement.ino diff --git a/examples/Steno/Steno.ino b/examples/Features/Steno/Steno.ino similarity index 100% rename from examples/Steno/Steno.ino rename to examples/Features/Steno/Steno.ino diff --git a/examples/TypingBreaks/TypingBreaks.ino b/examples/Features/TypingBreaks/TypingBreaks.ino similarity index 100% rename from examples/TypingBreaks/TypingBreaks.ino rename to examples/Features/TypingBreaks/TypingBreaks.ino diff --git a/examples/Cycle/Cycle.ino b/examples/Keystrokes/Cycle/Cycle.ino similarity index 100% rename from examples/Cycle/Cycle.ino rename to examples/Keystrokes/Cycle/Cycle.ino diff --git a/examples/Escape-OneShot/Escape-OneShot.ino b/examples/Keystrokes/Escape-OneShot/Escape-OneShot.ino similarity index 100% rename from examples/Escape-OneShot/Escape-OneShot.ino rename to examples/Keystrokes/Escape-OneShot/Escape-OneShot.ino diff --git a/examples/Leader/Leader.ino b/examples/Keystrokes/Leader/Leader.ino similarity index 100% rename from examples/Leader/Leader.ino rename to examples/Keystrokes/Leader/Leader.ino diff --git a/examples/MagicCombo/MagicCombo.ino b/examples/Keystrokes/MagicCombo/MagicCombo.ino similarity index 100% rename from examples/MagicCombo/MagicCombo.ino rename to examples/Keystrokes/MagicCombo/MagicCombo.ino diff --git a/examples/OneShot/OneShot.ino b/examples/Keystrokes/OneShot/OneShot.ino similarity index 100% rename from examples/OneShot/OneShot.ino rename to examples/Keystrokes/OneShot/OneShot.ino diff --git a/examples/Qukeys/Qukeys.ino b/examples/Keystrokes/Qukeys/Qukeys.ino similarity index 100% rename from examples/Qukeys/Qukeys.ino rename to examples/Keystrokes/Qukeys/Qukeys.ino diff --git a/examples/Redial/Redial.ino b/examples/Keystrokes/Redial/Redial.ino similarity index 100% rename from examples/Redial/Redial.ino rename to examples/Keystrokes/Redial/Redial.ino diff --git a/examples/ShapeShifter/ShapeShifter.ino b/examples/Keystrokes/ShapeShifter/ShapeShifter.ino similarity index 100% rename from examples/ShapeShifter/ShapeShifter.ino rename to examples/Keystrokes/ShapeShifter/ShapeShifter.ino diff --git a/examples/SpaceCadet/SpaceCadet.ino b/examples/Keystrokes/SpaceCadet/SpaceCadet.ino similarity index 100% rename from examples/SpaceCadet/SpaceCadet.ino rename to examples/Keystrokes/SpaceCadet/SpaceCadet.ino diff --git a/examples/Syster/Syster.ino b/examples/Keystrokes/Syster/Syster.ino similarity index 100% rename from examples/Syster/Syster.ino rename to examples/Keystrokes/Syster/Syster.ino diff --git a/examples/TapDance/TapDance.ino b/examples/Keystrokes/TapDance/TapDance.ino similarity index 100% rename from examples/TapDance/TapDance.ino rename to examples/Keystrokes/TapDance/TapDance.ino diff --git a/examples/TopsyTurvy/TopsyTurvy.ino b/examples/Keystrokes/TopsyTurvy/TopsyTurvy.ino similarity index 100% rename from examples/TopsyTurvy/TopsyTurvy.ino rename to examples/Keystrokes/TopsyTurvy/TopsyTurvy.ino diff --git a/examples/Unicode/Unicode.ino b/examples/Keystrokes/Unicode/Unicode.ino similarity index 100% rename from examples/Unicode/Unicode.ino rename to examples/Keystrokes/Unicode/Unicode.ino diff --git a/examples/Colormap/Colormap.ino b/examples/LEDs/Colormap/Colormap.ino similarity index 100% rename from examples/Colormap/Colormap.ino rename to examples/LEDs/Colormap/Colormap.ino diff --git a/examples/FingerPainter/FingerPainter.ino b/examples/LEDs/FingerPainter/FingerPainter.ino similarity index 100% rename from examples/FingerPainter/FingerPainter.ino rename to examples/LEDs/FingerPainter/FingerPainter.ino diff --git a/examples/GhostInTheFirmware/GhostInTheFirmware.ino b/examples/LEDs/GhostInTheFirmware/GhostInTheFirmware.ino similarity index 100% rename from examples/GhostInTheFirmware/GhostInTheFirmware.ino rename to examples/LEDs/GhostInTheFirmware/GhostInTheFirmware.ino diff --git a/examples/Heatmap/Heatmap.ino b/examples/LEDs/Heatmap/Heatmap.ino similarity index 100% rename from examples/Heatmap/Heatmap.ino rename to examples/LEDs/Heatmap/Heatmap.ino diff --git a/examples/IdleLEDs/IdleLEDs.ino b/examples/LEDs/IdleLEDs/IdleLEDs.ino similarity index 100% rename from examples/IdleLEDs/IdleLEDs.ino rename to examples/LEDs/IdleLEDs/IdleLEDs.ino diff --git a/examples/LED-ActiveModColor/LED-ActiveModColor.ino b/examples/LEDs/LED-ActiveModColor/LED-ActiveModColor.ino similarity index 100% rename from examples/LED-ActiveModColor/LED-ActiveModColor.ino rename to examples/LEDs/LED-ActiveModColor/LED-ActiveModColor.ino diff --git a/examples/LED-AlphaSquare/LED-AlphaSquare.ino b/examples/LEDs/LED-AlphaSquare/LED-AlphaSquare.ino similarity index 100% rename from examples/LED-AlphaSquare/LED-AlphaSquare.ino rename to examples/LEDs/LED-AlphaSquare/LED-AlphaSquare.ino diff --git a/examples/LED-Palette-Theme/LED-Palette-Theme.ino b/examples/LEDs/LED-Palette-Theme/LED-Palette-Theme.ino similarity index 100% rename from examples/LED-Palette-Theme/LED-Palette-Theme.ino rename to examples/LEDs/LED-Palette-Theme/LED-Palette-Theme.ino diff --git a/examples/LED-Stalker/LED-Stalker.ino b/examples/LEDs/LED-Stalker/LED-Stalker.ino similarity index 100% rename from examples/LED-Stalker/LED-Stalker.ino rename to examples/LEDs/LED-Stalker/LED-Stalker.ino diff --git a/examples/LEDEffect-BootGreeting/LEDEffect-BootGreeting.ino b/examples/LEDs/LEDEffect-BootGreeting/LEDEffect-BootGreeting.ino similarity index 100% rename from examples/LEDEffect-BootGreeting/LEDEffect-BootGreeting.ino rename to examples/LEDs/LEDEffect-BootGreeting/LEDEffect-BootGreeting.ino diff --git a/examples/LEDEffects/LEDEffects.ino b/examples/LEDs/LEDEffects/LEDEffects.ino similarity index 100% rename from examples/LEDEffects/LEDEffects.ino rename to examples/LEDs/LEDEffects/LEDEffects.ino