2015-10-27 18:33:18 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# Script to make a new quantum project
|
|
|
|
# Jack Humbert 2015
|
|
|
|
|
2016-04-07 22:09:53 +00:00
|
|
|
if [ -z "$1" ]; then
|
2016-04-26 17:44:27 +00:00
|
|
|
echo "Usage: $0 <keyboard_name>"
|
2016-04-07 22:09:53 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2016-06-24 02:18:20 +00:00
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
|
2015-10-27 18:33:18 +00:00
|
|
|
KEYBOARD=$1
|
|
|
|
KEYBOARD_UPPERCASE=$(echo $1 | awk '{print toupper($0)}')
|
|
|
|
|
2018-01-21 20:32:19 +00:00
|
|
|
cp -r quantum/template keyboards/$KEYBOARD
|
|
|
|
mv keyboards/$KEYBOARD/template.c keyboards/$KEYBOARD/$KEYBOARD.c
|
|
|
|
mv keyboards/$KEYBOARD/template.h keyboards/$KEYBOARD/$KEYBOARD.h
|
|
|
|
find keyboards/${KEYBOARD} -type f -exec sed -i "s;%KEYBOARD%;$KEYBOARD;g" {} \;
|
|
|
|
find keyboards/${KEYBOARD} -type f -exec sed -i "s;%KEYBOARD_UPPERCASE%;$KEYBOARD_UPPERCASE;g" {} \;
|
2015-10-27 18:33:18 +00:00
|
|
|
|
|
|
|
echo "######################################################"
|
2016-06-24 02:18:20 +00:00
|
|
|
echo "# /keyboards/$KEYBOARD project created. To start"
|
|
|
|
echo "# working on things, cd into keyboards/$KEYBOARD"
|
2016-03-04 15:15:21 +00:00
|
|
|
echo "######################################################"
|