summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfauxpark <fauxpark@gmail.com>2019-07-09 07:07:36 +1000
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-07-08 14:07:35 -0700
commit8b1cdd1e3d27cce830c36f9604e5f69337b2c83e (patch)
treeb86e7057a654588457561ff70b70d1eadc947ac7
parentdfebfecd48ebe972e7374e9ce26c795e3ddc88ae (diff)
Add copyright year placeholders to new keyboard script (#6280)
* Add copyright year placeholders to new keyboard script * More copyright header tweaks
-rw-r--r--quantum/template/avr/config.h2
-rw-r--r--quantum/template/avr/template.c2
-rw-r--r--quantum/template/base/keymaps/default/config.h2
-rw-r--r--quantum/template/base/keymaps/default/keymap.c2
-rw-r--r--quantum/template/base/template.h2
-rw-r--r--quantum/template/ps2avrgb/config.h2
-rw-r--r--quantum/template/ps2avrgb/rules.mk15
-rw-r--r--quantum/template/ps2avrgb/template.c2
-rw-r--r--quantum/template/ps2avrgb/usbconfig.h10
-rwxr-xr-xutil/new_keyboard.sh13
10 files changed, 20 insertions, 32 deletions
diff --git a/quantum/template/avr/config.h b/quantum/template/avr/config.h
index c13784ba15..1e41a2d31d 100644
--- a/quantum/template/avr/config.h
+++ b/quantum/template/avr/config.h
@@ -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
diff --git a/quantum/template/avr/template.c b/quantum/template/avr/template.c
index 86dc69abce..e852a42c40 100644
--- a/quantum/template/avr/template.c
+++ b/quantum/template/avr/template.c
@@ -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
diff --git a/quantum/template/base/keymaps/default/config.h b/quantum/template/base/keymaps/default/config.h
index 44382016a1..5b00c8956f 100644
--- a/quantum/template/base/keymaps/default/config.h
+++ b/quantum/template/base/keymaps/default/config.h
@@ -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
diff --git a/quantum/template/base/keymaps/default/keymap.c b/quantum/template/base/keymaps/default/keymap.c
index 482a445448..0e9fad357f 100644
--- a/quantum/template/base/keymaps/default/keymap.c
+++ b/quantum/template/base/keymaps/default/keymap.c
@@ -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
diff --git a/quantum/template/base/template.h b/quantum/template/base/template.h
index 5b5076c476..2e531b1fd4 100644
--- a/quantum/template/base/template.h
+++ b/quantum/template/base/template.h
@@ -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
diff --git a/quantum/template/ps2avrgb/config.h b/quantum/template/ps2avrgb/config.h
index d954fec961..320d71fcbc 100644
--- a/quantum/template/ps2avrgb/config.h
+++ b/quantum/template/ps2avrgb/config.h
@@ -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
diff --git a/quantum/template/ps2avrgb/rules.mk b/quantum/template/ps2avrgb/rules.mk
index bd0eed0527..98a920e182 100644
--- a/quantum/template/ps2avrgb/rules.mk
+++ b/quantum/template/ps2avrgb/rules.mk
@@ -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
diff --git a/quantum/template/ps2avrgb/template.c b/quantum/template/ps2avrgb/template.c
index 3f920de48c..07f27bbb22 100644
--- a/quantum/template/ps2avrgb/template.c
+++ b/quantum/template/ps2avrgb/template.c
@@ -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
diff --git a/quantum/template/ps2avrgb/usbconfig.h b/quantum/template/ps2avrgb/usbconfig.h
index 54a7d20f14..465db3a134 100644
--- a/quantum/template/ps2avrgb/usbconfig.h
+++ b/quantum/template/ps2avrgb/usbconfig.h
@@ -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"
diff --git a/util/new_keyboard.sh b/util/new_keyboard.sh
index e9ce309784..35d89e4026 100755
--- a/util/new_keyboard.sh
+++ b/util/new_keyboard.sh
@@ -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