Skip to content

Commit

Permalink
chore: update copyright headers to 2022
Browse files Browse the repository at this point in the history
The script used to identify and update the change is added into the GitHub
workflows script directory. A workflow action can be created to trigger the
script to update the headers on the first of every new year. Possibly a task for
a consequent PR.
  • Loading branch information
arifer612 authored and smile13241324 committed Jun 3, 2022
1 parent 6fd1165 commit 00f9ab1
Show file tree
Hide file tree
Showing 622 changed files with 696 additions and 621 deletions.
75 changes: 75 additions & 0 deletions .github/workflows/scripts/copyright_header
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#!/usr/bin/env bash
## Update the copyright headers with the current year
##
## Copyright (C) 2022 Sylvain Benner & Contributors
##
## Author: Arif Er
## URL: https://github.com/syl20bnr/spacemacs
##
## This file is not part of GNU Emacs.
##
## License: GPLv3

## Search for files recursively in BASEDIR for copyright headers. Skip all the
## files with the current year already in the copyright header. Otherwise,
## replace the most recent copyright header entry with the current year. If
## there are files with only a single year in the copyright header, extend the
## header to the current year.

SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
BASEDIR=$(dirname $(dirname $(dirname $SCRIPTPATH))) # Path to .emacs.d/
BLACKLIST=(
"core/libs/*"
".cache/*"
".git/*"
"assets/*"
"*cache*/*"
".*"
"persist/*"
"private/*"
"elpa/*"
)
ASSETS=(
"*.jpg"
"*.png"
"*.json"
"*.gpg"
)

EXCLUDES=()
for EXCLUDE in "${BLACKLIST[@]}"; do
EXCLUDES+=(! -path "'$BASEDIR/$EXCLUDE'")
done

IGNORES=()
for IGNORE in "${ASSETS[@]}"; do
IGNORES+=(! -name "'$IGNORE'")
done

YEAR=$(date '+%Y')
SKIP="^[#;]\{2\} Copyright ([Cc]) \([[:digit:]]\{4\}-\)\?${YEAR} .*$"

SINGLE_RX="^\([#;]\{2\} Copyright ([Cc])\) \([[:digit:]]\{4\}\) \(.*\)$"
SINGLE_RULE="s/${SINGLE_RX}/\1 \2-${YEAR} \3/"
DOUBLE_RX="^\([#;]\{2\} Copyright ([Cc]) [[:digit:]]\{4\}\)-\([[:digit:]]\{4\}\) \(.*\)$"
DOUBLE_RULE="0,/${DOUBLE_RX}/ s/${DOUBLE_RX}/\1-${YEAR} \3/"

while read FILE; do
if grep -qe "${SKIP}" $FILE; then
continue
fi

if grep -qe "$DOUBLE_RX" $FILE; then
# No in-place replacement because there are files with multiple headers
tac $FILE | sed "${DOUBLE_RULE}" | tac > /tmp/em-copyright
cat /tmp/em-copyright > $FILE
echo "$FILE has been updated. - DOUBLE"
continue
fi

if grep -qe "$SINGLE_RX" $FILE; then
sed -i "${SINGLE_RULE}" $FILE
echo "$FILE has been updated. - SINGLE"
continue
fi
done <<< $(eval find "$BASEDIR/" -type f ${EXCLUDES[@]} ${IGNORES[@]})
2 changes: 1 addition & 1 deletion core/aprilfool/zemacs.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; zemacs.el --- Spacemacs 2016 April Fools File
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/core-command-line.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; core-command-line.el --- Spacemacs Core File -*- lexical-binding: t -*-
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/core-compilation.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; core-compilation.el --- Spacemacs Core File -*- lexical-binding: t; no-byte-compile: t -*-
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Eugene "JAremko" Yaremenko <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/core-configuration-layer.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; core-configuration-layer.el --- Spacemacs Core File -*- lexical-binding: t -*-
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/core-custom-settings.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; core-custom-settings.el --- Spacemacs Core File -*- lexical-binding: t -*-
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/core-customization.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; core-customization.el --- Spacemacs Core File -*- lexical-binding: t -*-
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Eugene "JAremko" Yaremenko <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/core-display-init.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; core-display-init.el --- Spacemacs Core File -*- lexical-binding: t -*-
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/core-documentation.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; core-spacemacs.el --- Spacemacs Core File
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/core-dotspacemacs.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; core-dotspacemacs.el --- Spacemacs Core File -*- lexical-binding: t -*-
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/core-dumper.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; core-dumper.el --- Spacemacs Core File -*- lexical-binding: t -*-
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/core-early-funcs.el
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
;;
;; This file is sourced by emacs early-init.el file.
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/core-emacs-backports.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; core-emacs-backports.el --- Spacemacs Core File -*- lexical-binding: t -*-
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/core-env.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; core-env.el --- Spacemacs Core File -*- lexical-binding: t -*-
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/core-fonts-support.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; core-fonts-support.el --- Spacemacs Core File -*- lexical-binding: t -*-
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/core-funcs.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; core-funcs.el --- Spacemacs Core File -*- lexical-binding: t -*-
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/core-hooks.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; core-hooks.el --- Spacemacs Core File -*- lexical-binding: t -*-
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/core-jump.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; core-jump.el --- Spacemacs Core File -*- lexical-binding: t -*-
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/core-keybindings.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; core-keybindings.el --- Spacemacs Core File -*- lexical-binding: t -*-
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/core-load-paths.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; core-load-paths.el --- Spacemacs Core File -*- no-byte-compile: t; lexical-binding: t -*-
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/core-micro-state.el
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
;;; -*- lexical-binding: t -*-
;;; core-micro-state.el --- Spacemacs Core File
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/core-progress-bar.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; core-progress-bar.el --- Spacemacs Core File -*- lexical-binding: t -*-
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/core-release-management.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; core-spacemacs.el --- Spacemacs Core File -*- lexical-binding: t -*-
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/core-spacebind.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; core-spacebind.el --- Spacemacs Core File -*- lexical-binding: t -*-
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Eugene "JAremko" Yaremenko <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/core-spacemacs-buffer.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; core-spacemacs-buffer.el --- Spacemacs Core File -*- lexical-binding: t -*-
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/core-spacemacs.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; core-spacemacs.el --- Spacemacs Core File -*- lexical-binding: t -*-
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/core-themes-support.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; core-themes-support.el --- Spacemacs Core File -*- lexical-binding: t -*-
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/core-toggle.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; core-toggle.el --- Spacemacs Core File -*- lexical-binding: t -*-
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/core-transient-state.el
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
;;; -*- lexical-binding: t -*-
;;; core-transient-state.el --- Spacemacs Core File
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Justin Burkett <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/core-use-package-ext.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; core-use-package-ext.el --- Spacemacs Core File -*- lexical-binding: t -*-
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/core-versions.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; core-versions.el --- Spacemacs Core File -*- lexical-binding: t -*-
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion core/templates/packages.el.template
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; packages.el --- %LAYER_NAME% layer packages file for Spacemacs.
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: %USER_FULL_NAME% <%USER_MAIL_ADDRESS%>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion early-init.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; early-init.el --- Spacemacs Early Init File -*- no-byte-compile: t -*-
;;
;; Copyright (c) 2020 Sylvain Benner & Contributors
;; Copyright (c) 2020-2022 Sylvain Benner & Contributors
;;
;; Author: Miciah Dashiel Butler Masters <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion init.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; init.el --- Spacemacs Initialization File -*- no-byte-compile: t -*-
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion layers/+chat/erc/config.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; config.el --- erc Layer configuration File for Spacemacs
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion layers/+chat/erc/funcs.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; funcs.el --- Spacemacs ERC Layer functions File
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion layers/+chat/erc/local/erc-sasl/erc-sasl.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;; erc-sasl.el -- handle SASL PLAIN authentication

;; Copyright (C) 2012 Joseph Gay
;; Copyright (C) 2012-2022 Joseph Gay

;; Author: Joseph Gay <[email protected]>
;; Keywords: comm
Expand Down
2 changes: 1 addition & 1 deletion layers/+chat/erc/local/erc-tex/erc-tex.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; erc-tex.el --- LaTeX mathematical expressions rendering for ERC

;; Copyright (C) 2009 David Vazquez
;; Copyright (C) 2009-2022 David Vazquez

;; Last-modified: <2009-09-14 02:11:53 david>

Expand Down
2 changes: 1 addition & 1 deletion layers/+chat/erc/local/erc-yank/erc-yank.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; erc-yank --- Automagically create a Gist if pasting more than 5 lines

;; Copyright (C) 2012 John Wiegley
;; Copyright (C) 2012-2022 John Wiegley

;; Author: John Wiegley <[email protected]>
;; Created: 17 Jun 2012
Expand Down
2 changes: 1 addition & 1 deletion layers/+chat/erc/packages.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; packages.el --- erc Layer packages File for Spacemacs
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
2 changes: 1 addition & 1 deletion layers/+chat/jabber/funcs.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; funcs.el --- Jabber layer functions File for Spacemacs
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
Expand Down
Loading

0 comments on commit 00f9ab1

Please sign in to comment.