]> git.donarmstrong.com Git - qmk_firmware.git/blob - new_project.sh
Merge pull request #93 from petereichinger/master
[qmk_firmware.git] / new_project.sh
1 #!/bin/sh
2 # Script to make a new quantum project
3 # Jack Humbert 2015
4
5 KEYBOARD=$1
6 KEYBOARD_UPPERCASE=$(echo $1 | awk '{print toupper($0)}')
7
8 mkdir keyboard/$1
9 mkdir keyboard/$1/keymaps
10 sed -e "s;%KEYBOARD%;$KEYBOARD;g" -e "s;%KEYBOARD_UPPERCASE%;$KEYBOARD_UPPERCASE;g" quantum/template/template.h > keyboard/$KEYBOARD/$KEYBOARD.h
11 sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/template.c > keyboard/$KEYBOARD/$KEYBOARD.c
12 sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/config.h > keyboard/$KEYBOARD/config.h
13 sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/README.md > keyboard/$KEYBOARD/README.md
14 sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/Makefile > keyboard/$KEYBOARD/Makefile
15 sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/keymaps/keymap_default.c > keyboard/$KEYBOARD/keymaps/keymap_default.c
16 cp quantum/template/bootloader.hex keyboard/$KEYBOARD/bootloader.hex
17
18 echo "######################################################"
19 echo "# keyboard/$KEYBOARD project created. To start"
20 echo "# working on things, use the following command:"
21 echo "# cd keyboard/$KEYBOARD"
22 echo "######################################################"