2015-10-28 00:33:18 +06:00
|
|
|
#!/bin/sh
|
|
|
|
# Script to make a new quantum project
|
|
|
|
# Jack Humbert 2015
|
|
|
|
|
2016-04-08 04:09:53 +06:00
|
|
|
if [ -z "$1" ]; then
|
2016-04-26 23:44:27 +06:00
|
|
|
echo "Usage: $0 <keyboard_name>"
|
2016-04-08 04:09:53 +06:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2016-06-24 08:18:20 +06:00
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
|
2015-10-28 00:33:18 +06:00
|
|
|
KEYBOARD=$1
|
|
|
|
KEYBOARD_UPPERCASE=$(echo $1 | awk '{print toupper($0)}')
|
|
|
|
|
2016-06-22 08:39:54 +06:00
|
|
|
mkdir keyboards/$1
|
|
|
|
mkdir keyboards/$1/keymaps
|
|
|
|
mkdir keyboards/$1/keymaps/default
|
|
|
|
sed -e "s;%KEYBOARD%;$KEYBOARD;g" -e "s;%KEYBOARD_UPPERCASE%;$KEYBOARD_UPPERCASE;g" quantum/template/template.h > keyboards/$KEYBOARD/$KEYBOARD.h
|
|
|
|
sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/template.c > keyboards/$KEYBOARD/$KEYBOARD.c
|
|
|
|
sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/config.h > keyboards/$KEYBOARD/config.h
|
2016-06-24 08:18:20 +06:00
|
|
|
sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/readme.md > keyboards/$KEYBOARD/readme.md
|
2016-06-22 08:39:54 +06:00
|
|
|
sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/Makefile > keyboards/$KEYBOARD/Makefile
|
2016-06-24 08:18:20 +06:00
|
|
|
sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/keymaps/default/config.h > keyboards/$KEYBOARD/keymaps/default/config.h
|
2016-06-22 08:39:54 +06:00
|
|
|
sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/keymaps/default/keymap.c > keyboards/$KEYBOARD/keymaps/default/keymap.c
|
2016-06-24 08:18:20 +06:00
|
|
|
sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/keymaps/default/Makefile > keyboards/$KEYBOARD/keymaps/default/Makefile
|
|
|
|
sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/keymaps/default/readme.md > keyboards/$KEYBOARD/keymaps/default/readme.md
|
2015-10-28 00:33:18 +06:00
|
|
|
|
|
|
|
echo "######################################################"
|
2016-06-24 08:18:20 +06:00
|
|
|
echo "# /keyboards/$KEYBOARD project created. To start"
|
|
|
|
echo "# working on things, cd into keyboards/$KEYBOARD"
|
2016-03-04 21:15:21 +06:00
|
|
|
echo "######################################################"
|