#!/bin/bash
# This script generates a new keyboard directory under keyboards/,
# and copies the template files from quantum/template/ into it.
# Print an error message with the word "ERROR" in red.
# Print a message in bold.
# Prompt the user for information, showing the default value in brackets.
# Grab a username from Git config.
# Copy the template files to the new keyboard directory.
# Set the inplace editing parameter for sed.
# macOS/BSD sed expects a file extension immediately following -i.
# Replace a token with a value in the given list of files.
# Replace %YEAR% with the current year.
# Replace %KEYBOARD% with the keyboard name.
# Replace %YOUR_NAME% with the username.
# Check if an array contains an element.
# If we've been started from util/, we want to be in qmk_firmware/
&&
# The root qmk_firmware/ directory should have a subdirectory called quantum/
if [; then
fi
# Keyboard name is required, so keep prompting until we get one
while [; do
keyboard_name=
keyboard_base_name=
done
keyboard_dir="keyboards/"
if [; then
fi
KEYBOARD_TYPES=("avr" "ps2avrgb")
keyboard_type=
if ! ; then
fi
username=
[ &&