update-copyright.pl - Tool to update copyright years
update-copyright.pl [options] path...
-q [--quiet] : Do not show per file progress messages -v [--verbose] : Show diffs to changed files -i [--ignore-years] : Ignore the years already present use history only
update-copyright.pl is a script that uses svk to figure out when each file in your project has changed and updates the copyright headers in those files accordingly.
Run update-copyright.pl help to access the built-in tool documentation.
update-copyright.pl help
The year in which we live today. This is added to the copyright of any file that is modified, since we're modifying it today. If we didn't do this a subsequent run of this script would add it anyway.
Helper function to clear a console line.
Take the string $years containing comma separated years or dash separated year ranges and returns a list of years.
$years
For example the string '1998, 2000-2002, 2004' results in the list qw(1998 2000 2001 2002 2004).
Takes a sorted list of years @years and returns a string of comma separated years or dash separated year ranges.
@years
For example the list qw(1998 2000 2001 2002 2004) results in the string '1998-2002, 2004'.
If $line contains a copyright message add the years in @years to it and return the resulting line. If there is no Copyright on a line return undef. If @years is not specified Copyright lines are returned as is.
$line
Return a sorted list of years in which $filename was modified.
Update the copyright of one file.
Michael L.H. Brouwer <michael@tlaloc.net<gt>
Copyright 2006 by Michael L.H. Brouwer <michael@tlaloc.net>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html
To install SVK, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SVK
CPAN shell
perl -MCPAN -e shell install SVK
For more information on module installation, please visit the detailed CPAN module installation guide.