summaryrefslogtreecommitdiffstats
path: root/util/new_project.sh
diff options
context:
space:
mode:
authorChristopher Browne <cbbrowne@ca.afilias.info>2016-06-13 16:06:03 -0400
committerChristopher Browne <cbbrowne@ca.afilias.info>2016-06-13 16:06:03 -0400
commitdc9bf78f2b1d7d894576d87ea9bfc86d7bb3deee (patch)
tree44f432118882f9176ef6d901dc3d389d28737254 /util/new_project.sh
parentd649ab34334ff568448c47a04fcf40f1aa960135 (diff)
parent25d4772754186b8ab6ef86c28049da67a460f123 (diff)
Merge branch 'master' of https://github.com/jackhumbert/qmk_firmware
Diffstat (limited to 'util/new_project.sh')
-rwxr-xr-xutil/new_project.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/util/new_project.sh b/util/new_project.sh
new file mode 100755
index 0000000000..b85bbc31cf
--- /dev/null
+++ b/util/new_project.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+# Script to make a new quantum project
+# Jack Humbert 2015
+
+if [ -z "$1" ]; then
+ echo "Usage: $0 <keyboard_name>"
+ exit 1
+fi
+
+KEYBOARD=$1
+KEYBOARD_UPPERCASE=$(echo $1 | awk '{print toupper($0)}')
+
+mkdir keyboard/$1
+mkdir keyboard/$1/keymaps
+mkdir keyboard/$1/keymaps/default
+sed -e "s;%KEYBOARD%;$KEYBOARD;g" -e "s;%KEYBOARD_UPPERCASE%;$KEYBOARD_UPPERCASE;g" quantum/template/template.h > keyboard/$KEYBOARD/$KEYBOARD.h
+sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/template.c > keyboard/$KEYBOARD/$KEYBOARD.c
+sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/config.h > keyboard/$KEYBOARD/config.h
+sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/README.md > keyboard/$KEYBOARD/README.md
+sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/Makefile > keyboard/$KEYBOARD/Makefile
+sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/keymaps/default/keymap.c > keyboard/$KEYBOARD/keymaps/default/keymap.c
+
+echo "######################################################"
+echo "# keyboard/$KEYBOARD project created. To start"
+echo "# working on things, use the following command:"
+echo "# cd keyboard/$KEYBOARD"
+echo "######################################################"