]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Ask for your name when generating a new keyboard (#5214)
authorfauxpark <fauxpark@gmail.com>
Tue, 26 Feb 2019 15:59:34 +0000 (02:59 +1100)
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>
Tue, 26 Feb 2019 15:59:34 +0000 (07:59 -0800)
* Ask for your name when generating a new keyboard

* Update docs

* Apply suggestions from code review

Co-Authored-By: fauxpark <fauxpark@gmail.com>
docs/contributing.md
quantum/template/avr/config.h
quantum/template/avr/readme.md
quantum/template/avr/template.c
quantum/template/base/keymaps/default/config.h
quantum/template/base/keymaps/default/keymap.c
quantum/template/base/template.h
quantum/template/ps2avrgb/template.c
util/new_project.sh

index eee40609bb5de6115a2b2c2e712fc7ebb92d7cd8..88b9d7d9b471a6d8a2ed4a5e4d0c1371e3838807 100644 (file)
@@ -137,7 +137,7 @@ Most first-time QMK contributors start with their personal keymaps. We try to ke
 * All Keymap PR's are squashed, so if you care about how your commits are squashed you should do it yourself
 * Do not lump features in with keymap PR's. Submit the feature first and then a second PR for the keymap.
 * Do not include `Makefile`s in your keymap folder (they're no longer used)
-* Update copyrights in file headers (look for `REPLACE_WITH_YOUR_NAME `)
+* Update copyrights in file headers (look for `%YOUR_NAME%`)
 
 ## Keyboards
 
@@ -150,7 +150,7 @@ We also ask that you follow these guidelines:
 * Do not lump core features in with new keyboards. Submit the feature first and then submit a separate PR for the keyboard.
 * Name `.c`/`.h` file after the immediate parent folder, eg `/keyboards/<kb1>/<kb2>/<kb2>.[ch]`
 * Do not include `Makefile`s in your keyboard folder (they're no longer used)
-* Update copyrights in file headers (look for `REPLACE_WITH_YOUR_NAME `)
+* Update copyrights in file headers (look for `%YOUR_NAME%`)
 
 ## Quantum/TMK Core
 
index 2409ae186cb879bc0063f213c8f6b1225346ed36..a9bb75482136b8b1c958420c99aaac5a3191974f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Copyright 2019 REPLACE_WITH_YOUR_NAME
+Copyright 2019 %YOUR_NAME%
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define VENDOR_ID       0xFEED
 #define PRODUCT_ID      0x0000
 #define DEVICE_VER      0x0001
-#define MANUFACTURER    You
+#define MANUFACTURER    %YOUR_NAME%
 #define PRODUCT         %KEYBOARD%
 #define DESCRIPTION     A custom keyboard
 
index d243c66a9489c23cb47ac6d84dcd2fbf3cdf9abf..719222d3775931986e016890f05e0a70134f4f17 100644 (file)
@@ -4,7 +4,7 @@
 
 A short description of the keyboard/project
 
-Keyboard Maintainer: [You](https://github.com/yourusername)  
+Keyboard Maintainer: [%YOUR_NAME%](https://github.com/yourusername)  
 Hardware Supported: The PCBs, controllers supported  
 Hardware Availability: links to where you can find this hardware
 
index 3deeae88ba7abd416db7f7caac4ae89cbb3d17e4..1e4ce26cd162f9dde19fd3a2c4734104701187a7 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright 2019 REPLACE_WITH_YOUR_NAME
+/* Copyright 2019 %YOUR_NAME%
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index c8e4334124ef480280722fc387bcd7ec4cd99762..44382016a1f725c30d75e86958bed9ae4ba4a002 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright 2019 REPLACE_WITH_YOUR_NAME
+/* Copyright 2019 %YOUR_NAME%
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 11cd134a065b2f6c39ca8143881cd8a0f20469b8..482a4454487442df29b4fbe933a6fca04adf39ad 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright 2019 REPLACE_WITH_YOUR_NAME
+/* Copyright 2019 %YOUR_NAME%
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index caf2abb4c6b58bf4cc1028ca8d8a054fb26f991c..5b5076c47632ec252396af519326ade830ac5bf6 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright 2019 REPLACE_WITH_YOUR_NAME
+/* Copyright 2019 %YOUR_NAME%
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 4e35a2c129e65fdf72ad218f65470b624b290b33..08156c562c8dce15645ceadb9b0396ef31186450 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright 2019 REPLACE_WITH_YOUR_NAME
+/* Copyright 2019 %YOUR_NAME%
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index d1d1ed82ca3848337164d72211c5bb917cc5a2cf..9dec714b02a2160849cd2531f6396a5bf260e156 100755 (executable)
@@ -43,7 +43,11 @@ GIT=$(whereis git)
 if [ "$GIT" != "" ]; then
   IS_GIT_REPO=$($GIT log >>/dev/null 2>&1; echo $?)
   if [ "$IS_GIT_REPO" -eq 0 ]; then
-    ID="'$($GIT config --get user.name)'"
+    ID="$($GIT config --get user.name)"
+    read -rp "What is your name? [$ID] " YOUR_NAME
+    if [ -n "$YOUR_NAME" ]; then
+      ID=$YOUR_NAME
+    fi
     echo "Using $ID as user name"
 
     for i in "$NEW_KBD/config.h" \
@@ -52,7 +56,7 @@ if [ "$GIT" != "" ]; then
              "$NEW_KBD/keymaps/default/config.h" \
              "$NEW_KBD/keymaps/default/keymap.c"
     do
-      awk -v id="$ID" '{sub(/REPLACE_WITH_YOUR_NAME/,id); print}' < "$i" > "$i.$$"
+      awk -v id="$ID" '{sub(/%YOUR_NAME%/,id); print}' < "$i" > "$i.$$"
       mv "$i.$$" "$i"
     done
   fi