COPYRIGHT-UPDATE(1) | User commands | COPYRIGHT-UPDATE(1) |
copyright-update - Update Copyright information in files
copyright-update [options] FILE [FILE ...] copyright-update [options] --recursive PATH [PATH ...]
Update the copyright information in set of files, possibly recursively, matching content criteria. The updating affects copyright year, GPL address information etc.
The line must have word "Copyright", a space, three characters '(C)' (or a U+00A9 UTF copyright sign), a space, and the range of years. Varying amount of spaces and tabs are permitted, but there must be no spaces around the dash-character in YEAR-YEAR. Examples:
A whitespace, or multiple, required | | No space between years | | | Copyright (C) YYYY-YYYY Copyright: (C) YYYY-YYYY | A colon is optional
By default certain files and paths are always ignored; like version control directories, backups files, object files and binary files according to Perl's "-T" file test. Run program with option --help-exclude to see exclude path list.
If neither NAME nor EMAIL exists in environment, or if their values are not in a recognizable formats (see section ENVIRONMENT), this options does nothing.
This option effectively tries to preset value for the --line option.
Effectively replace paragraphs:
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301USA
With this:
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
If this option is not supplied, every file is automatically included. The matches can be further filtered by using option --exclude.
This option can be used multiple times. See also option --code.
This option can be used as a preliminary Content criteria, to select files before --line option finds the correct Copyright lines.
This option is applied after possible --include matches.
The default operation is to use current year, so this option is not necessary in normal use. Use case: you plan to take a long holiday before year's end and want to update the next year's value beforehand.
The primary use is to update files to reflect current year; option --year is implicit:
copyright-update *
To test what would happen:
copyright-update --verbose 1 --test *
Update only C-code file:
copyright-update --verbose 1 --include '\.[ch]$' --recursive .
It is possible to restrict updating files recursively to only those files whose content match regexp. Here, the lines affected are those that match --line regular expression.
copyright-update \ --regexp '(?i)Author:.*John.*Doe' \ --line '\bFoo\b' \ --ignore '\.(bak|bup|[~#]])$' \ --verbose 1 \ --year 2013 \ --test \ --recursive \ .
See option --debug.
In order to find first and lastname, the localpart in email address must match case insensitive regexp '^[a-z-]+\.[a-z-]+@':
address@example.com Not used, not in form First.Last +------ +---------- mr.first.lastname@example.com Not used, likewise +---------------- +---------- | | Localpart Domain part
None.
Not defined.
Uses only standard Perl modules.
The Copyright stanzas searched with option --fsf-address must be exactly like in the FSF recommendation in order for them to be noticed. See STANDARDS.
"How to use GNU licenses for your own software" http://www.gnu.org/copyleft/gpl-howto.html
"Information for maintainers of GNU software (6.5 Copyright Notices)" http://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html
"Information for maintainers of GNU software (6.6 License Notices)" http://www.gnu.org/prep/maintain/html_node/License-Notices.html#License-Notices
Homepage is at http://freecode.com/projects/copyright-update
Jari Aalto
Copyright (C) 2000-2016 Jari Aalto
This program is free software; you can redistribute and/or modify program under the terms of GNU General Public license either version 2 of the License, or (at your option) any later version. For more information, see see <http://www.gnu.org/licenses/>.
2016-10-18 | perl v5.22.2 |