]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Add copyright year placeholders to new keyboard script (#6280)
authorfauxpark <fauxpark@gmail.com>
Mon, 8 Jul 2019 21:07:36 +0000 (07:07 +1000)
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>
Mon, 8 Jul 2019 21:07:35 +0000 (14:07 -0700)
* Add copyright year placeholders to new keyboard script

* More copyright header tweaks

quantum/template/avr/config.h
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/config.h
quantum/template/ps2avrgb/rules.mk
quantum/template/ps2avrgb/template.c
quantum/template/ps2avrgb/usbconfig.h
util/new_keyboard.sh

index c13784ba153763d6f5acca51f394384e65762cd5..1e41a2d31d7b64867ccf582fe45b517351fa8aad 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Copyright 2019 %YOUR_NAME%
+Copyright %YEAR% %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 86dc69abce72f149c0e08f54108c7855ded66e24..e852a42c4096b83f55f175965e70912cb466fa0e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright 2019 %YOUR_NAME%
+/* Copyright %YEAR% %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 44382016a1f725c30d75e86958bed9ae4ba4a002..5b00c8956f9d0e237bc880d20f0193962cd4b935 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright 2019 %YOUR_NAME%
+/* Copyright %YEAR% %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 482a4454487442df29b4fbe933a6fca04adf39ad..0e9fad357f02b82d74c84ed49f25300626e281a2 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright 2019 %YOUR_NAME%
+/* Copyright %YEAR% %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 5b5076c47632ec252396af519326ade830ac5bf6..2e531b1fd42b071550239946fd017747a8c6f62e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright 2019 %YOUR_NAME%
+/* Copyright %YEAR% %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 d954fec961042865471980a5e7e7d58b0286f6a5..320d71fcbc55b7ed426fd7bb32d83a67ef780eed 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+Copyright %YEAR% %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 bd0eed0527e40654518eb9b39a4f32c6d8fc166d..98a920e1828cf2360db94f28c0b2f20f1d664ebb 100644 (file)
@@ -1,18 +1,3 @@
-# Copyright 2019 Luiz Ribeiro <luizribeiro@gmail.com>
-#
-# 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
-# the Free Software Foundation, either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
 # MCU name
 MCU = atmega32a
 PROTOCOL = VUSB
index 3f920de48c5c808f3013e43e6089cd9c026a1656..07f27bbb2296027ca4de47dda6c3dd72a568326e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright 2019 %YOUR_NAME%
+/* Copyright %YEAR% %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 54a7d20f142783843f4bdfb05930a95ef95833f7..465db3a134178ee63ef9ed39a4e0cd93b025ba7d 100644 (file)
@@ -1,13 +1,3 @@
-/* Name: usbconfig.h
- * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers
- * Author: Christian Starkjohann
- * Creation Date: 2005-04-01
- * Tabsize: 4
- * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH
- * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
- * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $
- */
-
 #pragma once
 
 #include "config.h"
index e9ce3097845accd0059f265a60eec9406028e18b..35d89e4026b04a8eea0c3610f984acba80bc02a4 100755 (executable)
@@ -70,6 +70,18 @@ replace_placeholders() {
     echo " done"
 }
 
+# Replace %YEAR% with the current year.
+replace_year_placeholders() {
+    local replace_year_filenames=(
+        "${keyboard_dir}/config.h"
+        "${keyboard_dir}/${keyboard_name}.c"
+        "${keyboard_dir}/${keyboard_name}.h"
+        "${keyboard_dir}/keymaps/default/config.h"
+        "${keyboard_dir}/keymaps/default/keymap.c"
+    )
+    replace_placeholders "%YEAR%" "$(date +%Y)" "${replace_year_filenames[@]}"
+}
+
 # Replace %KEYBOARD% with the keyboard name.
 replace_keyboard_placeholders() {
     local replace_keyboard_filenames=(
@@ -149,6 +161,7 @@ echo
 
 copy_templates
 set_sed_i
+replace_year_placeholders
 replace_keyboard_placeholders
 [ -n "$username" ] && replace_name_placeholders