Provided by: copyright-update_2010.0307+git23ecad8-2_all
copyright-update - Update Copyright information in files
copyright-update [options] FILE [FILE ...] | --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
-a, --auto In automatic mode, the author's name is read from environment variable NAME and only lines matching 'Copyright.*$NAME' are affected. If NAME is not set, read information from EMAIL. See section ENVIRONMENT. This option effectively presets value for the --line option. -d, --debug LEVEL Turn on debug. Level can be in range 0-10. --fsf-address Change FSF (a)ddress paragraphs pointing only to URL. This format is the format used in the GPL v3 license text: You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. Affects: paragraph with old address: 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 Affects: paragraph with new address: 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 -h, --help Print text help --help-html Print help in HTML format. --help-man Print help in manual page man(1) format. -i, --include REGEXP Include files mathing regexp. The match is done against whole path. The option can be used multiple times. If this option is not supplied, every file is automatically included. The matches can be further filtered by using options --exclude. -l, --line REGEXP Change only lines which match REGEXP. The match is case-insensitive. -r, --recursive Recursively search all direcotories given at command line. -R, --regexp REGEXP Change only files whose content matches REGEXP. The file is read in as a one big string so it's possible to match using Perl regular epxressions accross lines. An example: '(?smi)This.*multi.*line.*match'. See perlre(1) for more information about 'smi' modifiers. This options can be used as a preliminary Content criteria, to select the file, before --line option finds the correct Copyright line. -t, --test, --dry-run Run in test mode. Show what would happen. No files are changed. -v, --verbose LEVEL Print informational messages. Increase numeric LEVEL for more verbosity. -V, --version Print contact and version information -x, --exclude REGEXP Ignore files mathing regexp. The match is done against whole path. The option can be used multiple times. This option is applied after possible --include matches. -y, --year YEAR Update files using YEAR. Year value must be four digits. The default is current calendar year. -Y, --no-year Disable updating year.
The primary use is to update files according to the current year: copyright-update.pl --verbose 1 [--test] [--year YYYY] * Update only C-code file: copyright-update.pl --verbose 1 --include "*.[ch]" --recursive . It is possible to restrict updating files recursively to only those files whose content match regexp, like author is "Mr. Foo". The lines affected are those that match --line regular expression. copyright-update.pl \ --recursive \ --regexp "Author:.*Mr. Foo" \ --line '\bFoo\b' \ --ignore '\.(bak|bup|[~#]])$' \ --verbose 1 \ --year 2002 \ --test \ .
NAME In the form 'Firstname Lastname'. If set, this is used in option --auto. EMAIL In the form 'Firtname.Lastname@example.com>'. If set, this is used in option --auto only if environment variable NAME is not set. The localpart in email address must match case insensitive regexp '^[a-z-]+\.[a-z-]+@' or it is not used: email@example.com Not used firstname.lastname@example.org Not used ------------- Localpart
licensecheck(1) program in Debian.
Uses standard Perl modules.
Homepage is at http://freshmeat.net/projects/copyright-update
Copyright (C) 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.