.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "COPYRIGHT-UPDATE 1" .TH COPYRIGHT-UPDATE 1 "2013-06-02" "perl v5.14.2" "User commands" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" copyright\-update \- Update Copyright information in files .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& copyright\-update [options] FILE [FILE ...] \& copyright\-update [options] \-\-recursive PATH [PATH ...] .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Update the copyright information in set of files, possibly recursively, matching content criteria. The updating affects copyright year, \s-1GPL\s0 address information etc. .PP The line must have word \*(L"Copyright\*(R", a space, three characters '(C)' (or a U+00A9 \s-1UTF\s0 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: .PP .Vb 7 \& A whitespace, or multiple, required \& | | No space between years \& | | | \& Copyright (C) YYYY\-YYYY \& Copyright: (C) YYYY\-YYYY \& | \& A colon is optional .Ve .PP By default certain files and paths are always ignored; like version control directories, backups files, object files and binary files according to Perl's \f(CW\*(C`\-T\*(C'\fR file test. Run program with option \&\fB\-\-help\-exclude\fR to see exclude path list. .SH "OPTIONS" .IX Header "OPTIONS" .SS "Run options" .IX Subsection "Run options" .IP "\fB\-a, \-\-auto\fR" 4 .IX Item "-a, --auto" In automatic mode, the author's name is read from environment variable \&\s-1NAME\s0 and only lines matching 'Copyright.*$NAME' are affected. If \s-1NAME\s0 is not set, read information from \s-1EMAIL\s0. .Sp If neither \s-1NAME\s0 nor \s-1EMAIL\s0 exists in evenvironemt, or if their values are not in a recognizable formats (see section \s-1ENVIRONMENT\s0), this options does nothing. .Sp This option effectively tries to preset value for the \fB\-\-line\fR option. .IP "\fB\-c, \-\-code\fR" 4 .IX Item "-c, --code" Preset \fB\-\-include\fR to match common code files: .c, .h, .cc, .hh, .cpp, \&.c++, .hpp, .C, .pl, .py, .sh and .rb .IP "\fB\-d, \-\-debug \s-1LEVEL\s0\fR" 4 .IX Item "-d, --debug LEVEL" Turn on debug. Level can be in range 0\-10. .IP "\fB\-f, \-\-fsf\-address\fR" 4 .IX Item "-f, --fsf-address" Change License paragraphs that refer to \s-1FSF\s0 address. The \s-1FSF\s0's current recommendation is to redirect inquiries about licences to their \s-1URL\s0. .Sp Effectively replace paragraphs: .Sp .Vb 3 \& 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 .Ve .Sp With this: .Sp .Vb 2 \& You should have received a copy of the GNU General Public License \& along with this program. If not, see . .Ve .IP "\fB\-i, \-\-include \s-1REGEXP\s0\fR" 4 .IX Item "-i, --include REGEXP" Include files matching regexp. The match is done against whole path. .Sp If this option is not supplied, every file is automatically included. The matches can be further filtered by using option \fB\-\-exclude\fR. .Sp This option can be used multiple times. See also option \fB\-\-code\fR. .IP "\fB\-l, \-\-line \s-1REGEXP\s0\fR" 4 .IX Item "-l, --line REGEXP" Change only lines which match \s-1REGEXP\s0. The match is case-insensitive. .IP "\fB\-r, \-\-recursive\fR" 4 .IX Item "-r, --recursive" Recursively search all directories given in command line. .IP "\fB\-R, \-\-regexp \s-1REGEXP\s0\fR" 4 .IX Item "-R, --regexp REGEXP" Change only files whose content matches \s-1REGEXP\s0. The file is read in as a one big string so that it's possible to match using Perl regular expressions across the whole file. An example: \&'(?smi)This.*multi.*line.*match'. See \fIperlre\fR\|(1) for more information about 'smi' and other modifiers. .Sp This option can be used as a preliminary \fIContent criteria\fR, to select files before \fB\-\-line\fR option finds the correct Copyright lines. .IP "\fB\-t, \-\-test, \-\-dry\-run\fR" 4 .IX Item "-t, --test, --dry-run" Run in test mode. Show what would happen. No files are changed. .IP "\fB\-v, \-\-verbose \s-1LEVEL\s0\fR" 4 .IX Item "-v, --verbose LEVEL" Print informational messages. Increase numeric \s-1LEVEL\s0 for more verbosity. .IP "\fB\-x, \-\-exclude \s-1REGEXP\s0\fR" 4 .IX Item "-x, --exclude REGEXP" Ignore files matching regexp. The match is done against whole path. The option can be used multiple times. .Sp This option is applied after possible \fB\-\-include\fR matches. .IP "\fB\-y, \-\-year \s-1YEAR\s0\fR" 4 .IX Item "-y, --year YEAR" Update files using \s-1YEAR\s0. Value must be four digits. .Sp The default operation is to use currect 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. .IP "\fB\-Y, \-\-no\-year\fR" 4 .IX Item "-Y, --no-year" Disable updating year. .SS "Miscellaneus options" .IX Subsection "Miscellaneus options" .IP "\fB\-h, \-\-help\fR" 4 .IX Item "-h, --help" Display help. .IP "\fB\-\-help\-exclude\fR" 4 .IX Item "--help-exclude" Display default values used to exclude paths and files. .IP "\fB\-\-help\-html\fR" 4 .IX Item "--help-html" Display help in \s-1HTML\s0 format. .IP "\fB\-\-help\-man\fR" 4 .IX Item "--help-man" Display help in manual page \f(CWman(1)\fR format. .IP "\fB\-V, \-\-version\fR" 4 .IX Item "-V, --version" Display contact and version information. .SH "EXAMPLES" .IX Header "EXAMPLES" The primary use is to update files to reflect current year; option \&\fB\-\-year\fR is implicit: .PP .Vb 1 \& copyright\-update * .Ve .PP To test what would happen: .PP .Vb 1 \& copyright\-update \-\-verbose 1 \-\-test * .Ve .PP Update only C\-code file: .PP .Vb 1 \& copyright\-update \-\-verbose 1 \-\-include \*(Aq\e.[ch]$\*(Aq \-\-recursive . .Ve .PP It is possible to restrict updating files recursively to only those files whose content match regexp. Here, the lines affected are those that match \fB\-\-line\fR regular expression. .PP .Vb 9 \& copyright\-update \e \& \-\-regexp \*(Aq(?i)Author:.*John.*Doe\*(Aq \e \& \-\-line \*(Aq\ebFoo\eb\*(Aq \e \& \-\-ignore \*(Aq\e.(bak|bup|[~#]])$\*(Aq \e \& \-\-verbose 1 \e \& \-\-year 2013 \e \& \-\-test \e \& \-\-recursive \e \& . .Ve .SH "TROUBLESHOOTING" .IX Header "TROUBLESHOOTING" See option \fB\-\-debug\fR. .SH "ENVIRONMENT" .IX Header "ENVIRONMENT" .IP "\s-1EMAIL\s0" 4 .IX Item "EMAIL" In the form \*(L"firstname.lastname@example.com\*(R"; that is, without the angles <>. If set, the value is used in option \fB\-\-auto\fR only if environment variable \s-1NAME\s0 is not set. .Sp In order to find first and lastname, the localpart in email address must match case insensitive regexp \f(CW\*(Aq^[a\-z\-]+\e.[a\-z\-]+@\*(Aq\fR: .Sp .Vb 2 \& address@example.com Not used, not in form First.Last \& +\-\-\-\-\-\- +\-\-\-\-\-\-\-\-\-\- \& \& mr.first.lastname@example.com Not used, likewise \& +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- +\-\-\-\-\-\-\-\-\-\- \& | | \& Localpart Domain part .Ve .IP "\s-1NAME\s0" 4 .IX Item "NAME" In the form \*(L"Firstname Lastname\*(R". If set, the value is used in option \&\fB\-\-auto\fR. .SH "FILES" .IX Header "FILES" None. .SH "EXIT STATUS" .IX Header "EXIT STATUS" Not defined. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIlicensecheck\fR\|(1) .SH "DEPENDENCIES" .IX Header "DEPENDENCIES" Uses only standard Perl modules. .SH "BUGS AND LIMITATIONS" .IX Header "BUGS AND LIMITATIONS" The Copyright stanzas searched with option \fB\-\-fsf\-address\fR must be exactly like in the \s-1FSF\s0 recommendation in order for them to be noticed. See \s-1STANDARDS\s0. .SH "STANDARDS" .IX Header "STANDARDS" \&\f(CW\*(C`How to use GNU licenses for your own software\*(C'\fR http://www.gnu.org/copyleft/gpl\-howto.html .PP \&\f(CW\*(C`Information for maintainers of GNU software (6.5 Copyright Notices)\*(C'\fR http://www.gnu.org/prep/maintain/html_node/Copyright\-Notices.html .PP \&\f(CW\*(C`Information for maintainers of GNU software (6.6 License Notices)\*(C'\fR http://www.gnu.org/prep/maintain/html_node/License\-Notices.html#License\-Notices .SH "AVAILABILITY" .IX Header "AVAILABILITY" Homepage is at http://freecode.com/projects/copyright\-update .SH "AUTHOR" .IX Header "AUTHOR" Jari Aalto .SH "LICENSE AND COPYRIGHT" .IX Header "LICENSE AND COPYRIGHT" Copyright (C) 2000\-2013 Jari Aalto .PP This program is free software; you can redistribute and/or modify program under the terms of \s-1GNU\s0 General Public license either version 2 of the License, or (at your option) any later version. For more information, see see .