pax_global_header00006660000000000000000000000064130014630160014504gustar00rootroot0000000000000052 comment=25f058e3de4b45f56ace3ac07ca1c2fd0f88faf4 copyright-update-2016.1018/000077500000000000000000000000001300146301600153165ustar00rootroot00000000000000copyright-update-2016.1018/COPYING000066400000000000000000000431031300146301600163520ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. copyright-update-2016.1018/ChangeLog000066400000000000000000000163121300146301600170730ustar00rootroot000000000000002016-10-18 Tue Jari Aalto * bin/copyright-update.pl: (IMPORT): Encode copyright sign in UTF-8. Patch thanks to Philipp Büttgenbach in https://bugs.debian.org/814751 2013-06-02 Sun Jari Aalto * bin/copyright-update.pl (POD::OPTIONS::--auto): Fix typo. 2013-05-25 Sat Jari Aalto * bin/copyright-update.pl (HELP::STANDARDS): New. 2012-01-30 Mon Jari Aalto * bin/copyright-update.pl (Help::POD): Fix typo in --fsf-address option description. Fix typo in --include option. Fix typo in --recursive option. Fix typo in --regexp option. Improve --year desctiption. Use word "display" in place of "print". (Main, wanted): Fix indent. (Help): Fix Pod::Man library load. 2011-04-14 Jari Aalto * bin/copyright-update.pl (POD): Minor grammar corrections and wording changes. 2011-04-09 Sat Jari Aalto * bin/copyright-update.pl (Help::POD): Move --help options to the end. Minor updated to documentation. (DEFAULT_FILE_EXCLUDE): Add config.guess, config.sub, ltconfig, depcomp, missing, COPYING. (HandleCommandLineArgs): Add new option --code. 2010-12-14 Tue Jari Aalto * bin/copyright-update.pl (FsfAddress): Remove city name Boston from regexp. 2010-12-11 Sat Jari Aalto * bin/copyright-update.pl (Help::OPTIONS): update option -y. (Help::EXAMPLES): Correct C-code regexp, Chnage "Mr. Foo" to "John Doe". 2010-05-01 Sat Jari Aalto * bin/copyright-update.pl (HandleCommandLineArgs): Remove "require_order" from Getopt::Long::config(). 2010-04-15 Thu Jari Aalto * bin/copyright-update.pl (top level): Correct many of the Perl::Critic remarks. (Help): rewrite eval Pod::Man call. 2010-04-04 Sun Jari Aalto * bin/copyright-update.pl (HandleCommandLineArgs): Arrange options in call to GetOptions(). (Initialize): Chnage variable definition order. (Year): Add space to time(). (wanted): Correct typo in description block. (Help): Correct manual page string that appears in the center. 2010-03-24 Wed Jari Aalto * README (at the end): add Copyright and License. 2010-03-15 Mon Jari Aalto * bin/copyright-update.pl (HELP): Remove *.pl suffix. (HelpExclude): Correct function banner text. 2010-03-13 Sat Jari Aalto * copyright-update.pl: (top level): rearrange globals, use comamnds. (Initialize): new. Add missing handling for --version option. (Version*): new. 2010-03-15 Mon Jari Aalto * bin/copyright-update.pl: master 2010-03-12 Sat Jari Aalto * bin/copyright-update.pl: (top level): English qw( -no_match_vars ) 2010-03-09 Tue Jari Aalto * bin/copyright-update.pl (HandleFile): Suppress year change messages if nothing is matched. (FsfAddress): Improve regexp. 2010-03-08 Mon Jari Aalto * bin/copyright-update.pl (Help::LICENSE): New section. (Help::SYNOPSIN): remove extra character '>' at end. (top level): add $DEFAULT_PATH_EXCLUDE, $DEFAULT_FILE_EXCLUDE. (wanted): Use $DEFAULT_PATH_EXCLUDE, $DEFAULT_FILE_EXCLUDE. (HelpExclude): New. (HandleCommandLineArgs): New option --help-exclude. 2010-03-07 Sun Jari Aalto * Makefile: (dist-*): Run 'doc'. * bin/copyright-update.pl (top level): Add stanza 'Standard perl modules'. (HandleCommandLineArgs): In --auto options, check NAME and EMAIL more carefully. (Help::EMAIL): Document email address in more detail. 2010-03-03 Wed Jari Aalto * bin/copyright-update.pl (HandleCommandLineArgs): Accept -r as a shorthand to --recursive. (HandleFile): Detect manual page style: YYYY\-YYYY (HandleCommandLineArgs): Add new option --auto. DEfine -d for --debug. (Help::ENVIRONMENT): Document NAME and EMAIL. (HandleFile): Add support for U+00A9 UTF copyright sign. (HandleCommandLineArgs): Add options --all, --include and --exclude (was: --ignore). (IsInclude): New. (IsExclude): New. (wanted): Add include and exclude tests. 2010-03-02 Tue Jari Aalto * bin/copyright-update.pl: (Help::AVAILABILITY): Add Homepage. (Help::SYNOPSIS): Add section. (FsfAddress): Change s// dereferencing \1 to $1 in REPLACEMENT side. * Makefile (dist-git): Run 'test'. (dist-snap): Run 'test'. 2010-03-01 Mon Jari Aalto * INSTALL: Update requirements and manual install. Make a standalone project. This program has been part of the Emacs Tiny Tools project. See http://freecode.com/projects/emacs-tiny-tools * copyright-update.pl: (top level): update Copyright template. (Help): reorder manual page into sections. (HandleCommandLineArgs): Change all mixed case long options into standard lowercase option. Like --Version is not --version. 2010-01-05 Jari Aalto * copyright-update.pl (HELP::OPTIONS): New options --fsf-address and --no-year. (FsfAddress): New. (Help): Add new user option --fsf-address. (HandleFile): Use FsfAddress(). 2009-11-02 Jari Aalto * copyright-update.pl (wanted): Ignore .hg and .mtn version control directories. 2008-09-14 Jari Aalto * copyright-update.pl (HELP): Document new option --line RE. (HandleFile): Chnage only --line RE lines. 2008-01-25 Jari Aalto * copyright-update.pl (HandleCommandLineArgs): Accept --debug LEVEL, instead of just -d. (Main): Display warning if there are no matching files. (wanted): Add git, darcs, arch version control directories to default ignore list. 2008-08-22 Jari Aalto * copyright-update.pl (Help): Work around 5.10 bug for pod2text. 2007-05-01 Jari Aalto * copyright-update.pl (HandleFile): Variable $msg had wrong number of double quotes. (HandleFile): Missing semicolon from statement inside '$y eq $YEAR'. (wanted): $ignore pattern improved to cinlude ".#thisfile". 2006-02-19 Jari Aalto * copyright-update.pl: (HandleCommandLineArgs): New --ignore option and variable $OPT_REGEXP_IGNORE (wanted): Check user's 2005-05-19 Jari Aalto * copyright-update.pl (top level): Remove version control Id-tag. Corrected #!-line. Remove extra newlines from the code. 2003-02-06 Thu Jari Aalto * copyright-update.pl (Main): 1.5 Rewritten. (FileGlobs): 1.5 New. (wanted): 1.5 New. (HandleFile): 1.5 New. (HandleCommandLineArgs): 1.5 Added option --recursive and --regexp. (Help): 1.5 Added documentation about recursive changes. (Help): 1.5 Added HTML help generation with --help-html and Manual pages with --help-man 2003-01-28 Jari Aalto * copyright-update.pl: Do not use #!/usr/local/bin/perl, but only #!perl. Suppose perl is along path. 2001-12-08 Jari Aalto * copyright-update.pl New Program. Updates copyright information. (other features can be added here.) copyright-update-2016.1018/INSTALL000066400000000000000000000007061300146301600163520ustar00rootroot00000000000000INSTALL: copyright-update - Update copyright information in files ----------------------------------------------------------------- System wide install Run makefile with appropriate parameters. The program is installed without any file extension. An example: make [-n] DESTDIR= prefix=/usr/local install Manual install 1. Copy bin/*.pl somewhere along $PATH 2. Copy bin/*.1 somewhere along $MANPATH End of file copyright-update-2016.1018/Makefile000077500000000000000000000116001300146301600167570ustar00rootroot00000000000000#!/usr/bin/make -f # # Copyright information # # Copyright (C) 2002-2016 Jari Aalto # # License # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ifneq (,) This makefile requires GNU Make. endif PACKAGE = copyright-update DESTDIR = prefix = /usr exec_prefix = $(prefix) man_prefix = $(prefix)/share mandir = $(man_prefix)/man bindir = $(exec_prefix)/bin sharedir = $(prefix)/share BINDIR = $(DESTDIR)$(bindir) DOCDIR = $(DESTDIR)$(sharedir)/doc/$(PACKAGE) LOCALEDIR = $(DESTDIR)$(sharedir)/locale SHAREDIR = $(DESTDIR)$(sharedir)/$(PACKAGE) LIBDIR = $(DESTDIR)$(prefix)/lib/$(PACKAGE) SBINDIR = $(DESTDIR)$(exec_prefix)/sbin ETCDIR = $(DESTDIR)/etc/$(PACKAGE) # 1 = regular, 5 = conf, 6 = games, 8 = daemons MANDIR = $(DESTDIR)$(mandir) MANDIR1 = $(MANDIR)/man1 MANDIR5 = $(MANDIR)/man5 MANDIR6 = $(MANDIR)/man6 MANDIR8 = $(MANDIR)/man8 TAR = tar TAR_OPT_NO = --exclude='.build' \ --exclude='.sinst' \ --exclude='.inst' \ --exclude='tmp' \ --exclude='*.bak' \ --exclude='*[~\#]' \ --exclude='.\#*' \ --exclude='CVS' \ --exclude='.svn' \ --exclude='.git' \ --exclude='.bzr' \ --exclude='*.tar*' \ --exclude='*.tgz' INSTALL = /usr/bin/install INSTALL_BIN = $(INSTALL) -m 755 INSTALL_DATA = $(INSTALL) -m 644 INSTALL_SUID = $(INSTALL) -m 4755 DIST_DIR = ../build-area DATE = `date +"%Y.%m%d"` VERSION = $(DATE) RELEASE = $(PACKAGE)-$(VERSION) BIN = $(PACKAGE) PL_SCRIPT = bin/$(BIN).pl INSTALL_OBJS_BIN = $(PL_SCRIPT) INSTALL_OBJS_DOC = README COPYING INSTALL_OBJS_MAN = bin/*.1 all: @echo "Nothing to compile." @echo "Try 'make help' or 'make -n DESTDIR= prefix=/usr/local install'" # Rule: help - display Makefile rules help: @grep "^# Rule:" Makefile | sort # Rule: clean - remove temporary files clean: # clean -rm -f *[#~] *.\#* \ *.x~~ pod*.tmp rm -rf tmp distclean: clean realclean: clean dist-git: test doc rm -f $(DIST_DIR)/$(RELEASE)* mkdir -p $(DIST_DIR) git archive --format=tar --prefix=$(RELEASE)/ master | \ gzip --best > $(DIST_DIR)/$(RELEASE).tar.gz chmod 644 $(DIST_DIR)/$(RELEASE).tar.gz tar -tvf $(DIST_DIR)/$(RELEASE).tar.gz | sort -k 5 ls -la $(DIST_DIR)/$(RELEASE).tar.gz # The "gt" is maintainer's program frontend to Git # Rule: dist-snap - [maintainer] release snapshot from Git repository dist-snap: test doc @echo gt tar -q -z -p $(PACKAGE) -c -D master # Rule: dist-git - [maintainer] release from Git repository dist: dist-git # Rule: dist-ls - [maintainer] List release files in achive dist-ls: @ls -1tr $(DIST_DIR)/$(PACKAGE)* # Rule: dist - [maintainer] list of release files ls: dist-ls bin/$(PACKAGE).1: $(PL_SCRIPT) $(PERL) $< --help-man > $@ @-rm -f *.x~~ pod*.tmp doc/manual/$(PACKAGE).html: $(PL_SCRIPT) $(PERL) $< --help-html > $@ @-rm -f *.x~~ pod*.tmp doc/manual/$(PACKAGE).txt: $(PL_SCRIPT) $(PERL) $< --help > $@ @-rm -f *.x~~ pod*.tmp doc/conversion/index.html: doc/conversion/index.txt perl -S t2html.pl --Auto-detect --Out --print-url $< # Rule: man - Generate or update manual page man: bin/$(PACKAGE).1 html: doc/manual/$(PACKAGE).html txt: doc/manual/$(PACKAGE).txt # Rule: doc - Generate or update all documentation doc: man html txt # Rule: perl-test - Check program syntax perl-test: # perl-test - Check syntax perl -cw $(PL_SCRIPT) podchecker $(PL_SCRIPT) # Rule: test - Run tests test: perl-test install-doc: # Rule install-doc - Install documentation $(INSTALL_BIN) -d $(DOCDIR) [ ! "$(INSTALL_OBJS_DOC)" ] || \ $(INSTALL_DATA) $(INSTALL_OBJS_DOC) $(DOCDIR) $(TAR) -C doc $(TAR_OPT_NO) --create --file=- . | \ $(TAR) -C $(DOCDIR) --extract --file=- install-man: man # install-man - Install manual pages $(INSTALL_BIN) -d $(MANDIR1) $(INSTALL_DATA) $(INSTALL_OBJS_MAN) $(MANDIR1) install-bin: # install-bin - Install programs $(INSTALL_BIN) -d $(BINDIR) for f in $(INSTALL_OBJS_BIN); \ do \ dest=$$(basename $$f | sed -e 's/\.pl$$//' -e 's/\.py$$//' ); \ $(INSTALL_BIN) $$f $(BINDIR)/$$dest; \ done # Rule: install - Standard install install: install-bin install-man install-doc # Rule: install-test - for Maintainer only install-test: rm -rf tmp make DESTDIR=`pwd`/tmp prefix=/usr install find tmp | sort .PHONY: clean distclean realclean .PHONY: install install-bin install-man .PHONY: all man doc test install-test perl-test .PHONY: dist dist-git dist-ls ls # End of file copyright-update-2016.1018/README000066400000000000000000000021161300146301600161760ustar00rootroot00000000000000README: copyright-update - Update copyright information in files ---------------------------------------------------------------- Update the copyright information in set of files, possibly recursively, matching content criteria. The updating affects copyright year, GPL address information etc. The source package directories: bin/ The program and system manual page (*.1) doc/ Documentation Important files COPYING GPL v2 or later Licence INSTALL Install instructions ChangeLog Project change records Project details Homepage http://freecode.com/projects/copyright-update To report bugs See freecode page Source code repository See freecode page Depends Perl (any version). Uses only standard Perl libraries. Copyright Copyright (C) 2000-2016 Jari Aalto License 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. End of file copyright-update-2016.1018/bin/000077500000000000000000000000001300146301600160665ustar00rootroot00000000000000copyright-update-2016.1018/bin/copyright-update.1000066400000000000000000000312531300146301600214440ustar00rootroot00000000000000.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.32) .\" .\" 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" '' . ds C` . ds C' '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. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" 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 "2016-10-18" "perl v5.22.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\-2016 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 . copyright-update-2016.1018/bin/copyright-update.pl000077500000000000000000000564531300146301600217330ustar00rootroot00000000000000#!/usr/bin/perl # # copyright-update -- Utility to update copyright information in files # # Copyright # # Copyright (C) 2000-2016 Jari Aalto # # License # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Documentation # # To read manual, start this program with option: --help # **************************************************************************** # # Standard perl modules # # **************************************************************************** use strict; use autouse 'Pod::Text' => qw( pod2text ); use autouse 'Pod::Html' => qw( pod2html ); use English qw( -no_match_vars ); use Getopt::Long; use File::Basename; use File::Find; use charnames q(:full); use Encode; use Encode::Guess; IMPORT: # This is just a syntactic sugar: actually no-op { # Import following environment variables use Env; use vars qw ( $NAME $EMAIL ); } # **************************************************************************** # # GLOBALS # # **************************************************************************** use vars qw ( $VERSION ); # This is for use of Makefile.PL and ExtUtils::MakeMaker # # The following variable is updated by custom Emacs setup whenever # this file is saved. my $VERSION = '2015.0928.0638'; my $DEFAULT_PATH_EXCLUDE = # Matches *only path component '(CVS|RCS|\.(bzr|svn|git|darcs|arch|mtn|hg))$' ; my $DEFAULT_FILE_EXCLUDE = # Matches *only* file component '[#~]$' . '|\.[#]' . '|\.(s?o|l?a|bin|com|exe|class|elc)$' . '|\.(ods|odt|pdf|ppt|xls|rtf)$' . '|\.(xpm|jpg|png|gif|tiff|bmp)$' . '|(config.guess|config.sub|ltconfig|depcomp|missing|COPYING)$' ; # **************************************************************************** # # DESCRIPTION # # Set global variables for the program # # INPUT PARAMETERS # # none # # RETURN VALUES # # none # # **************************************************************************** sub Initialize () { use vars qw ( $LICENSE $CONTACT $URL $LIB $PROGNAME ); $LICENSE = "GPL-2+"; $CONTACT = "Jari Aalto"; $URL = "http://freecode.com/projects/copyright-update"; $LIB = basename $PROGRAM_NAME; $PROGNAME = $LIB; $OUTPUT_AUTOFLUSH = 1; } # **************************************************************************** # # DESCRIPTION # # Help function and embedded POD documentation # # INPUT PARAMETERS # # none # # RETURN VALUES # # none # # **************************************************************************** =pod =head1 NAME copyright-update - Update Copyright information in files =head1 SYNOPSIS copyright-update [options] FILE [FILE ...] copyright-update [options] --recursive PATH [PATH ...] =head1 DESCRIPTION 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 C<-T> file test. Run program with option B<--help-exclude> to see exclude path list. =head1 OPTIONS =head2 Run options =over 4 =item B<-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. If neither NAME nor EMAIL exists in evenvironemt, 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 B<--line> option. =item B<-c, --code> Preset B<--include> to match common code files: .c, .h, .cc, .hh, .cpp, .c++, .hpp, .C, .pl, .py, .sh and .rb =item B<-d, --debug LEVEL> Turn on debug. Level can be in range 0-10. =item B<-f, --fsf-address> Change License paragraphs that refer to FSF address. The FSF's current recommendation is to redirect inquiries about licences to their URL. 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 . =item B<-i, --include REGEXP> Include files matching regexp. The match is done against whole path. If this option is not supplied, every file is automatically included. The matches can be further filtered by using option B<--exclude>. This option can be used multiple times. See also option B<--code>. =item B<-l, --line REGEXP> Change only lines which match REGEXP. The match is case-insensitive. =item B<-r, --recursive> Recursively search all directories given in command line. =item B<-R, --regexp REGEXP> Change only files whose content matches REGEXP. 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 perlre(1) for more information about 'smi' and other modifiers. This option can be used as a preliminary I, to select files before B<--line> option finds the correct Copyright lines. =item B<-t, --test, --dry-run> Run in test mode. Show what would happen. No files are changed. =item B<-v, --verbose LEVEL> Print informational messages. Increase numeric LEVEL for more verbosity. =item B<-x, --exclude REGEXP> Ignore files matching regexp. The match is done against whole path. The option can be used multiple times. This option is applied after possible B<--include> matches. =item B<-y, --year YEAR> Update files using YEAR. Value must be four digits. 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. =item B<-Y, --no-year> Disable updating year. =back =head2 Miscellaneus options =over 4 =item B<-h, --help> Display help. =item B<--help-exclude> Display default values used to exclude paths and files. =item B<--help-html> Display help in HTML format. =item B<--help-man> Display help in manual page C format. =item B<-V, --version> Display contact and version information. =back =head1 EXAMPLES The primary use is to update files to reflect current year; option B<--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 B<--line> regular expression. copyright-update \ --regexp '(?i)Author:.*John.*Doe' \ --line '\bFoo\b' \ --ignore '\.(bak|bup|[~#]])$' \ --verbose 1 \ --year 2013 \ --test \ --recursive \ . =head1 TROUBLESHOOTING See option B<--debug>. =head1 ENVIRONMENT =over 4 =item EMAIL In the form "firstname.lastname@example.com"; that is, without the angles <>. If set, the value is used in option B<--auto> only if environment variable NAME is not set. In order to find first and lastname, the localpart in email address must match case insensitive regexp C<'^[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 =item NAME In the form "Firstname Lastname". If set, the value is used in option B<--auto>. =back =head1 FILES None. =head1 EXIT STATUS Not defined. =head1 SEE ALSO licensecheck(1) =head1 DEPENDENCIES Uses only standard Perl modules. =head1 BUGS AND LIMITATIONS The Copyright stanzas searched with option B<--fsf-address> must be exactly like in the FSF recommendation in order for them to be noticed. See STANDARDS. =head1 STANDARDS C http://www.gnu.org/copyleft/gpl-howto.html C http://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html C http://www.gnu.org/prep/maintain/html_node/License-Notices.html#License-Notices =head1 AVAILABILITY Homepage is at http://freecode.com/projects/copyright-update =head1 AUTHOR Jari Aalto =head1 LICENSE AND COPYRIGHT 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 . =cut sub Help (;$$) { my $id = "$LIB.Help"; my $type = shift; # optional arg, type my $msg = shift; # optional arg, why are we here... if ( $type eq -html ) { pod2html $PROGRAM_NAME; } elsif ( $type eq -man ) { eval { require Pod::Man; 1 } or die "$id: Cannot generate Man: $EVAL_ERROR"; my %options; $options{center} = "User commands"; my $parser = Pod::Man->new(%options); $parser->parse_from_file ($PROGRAM_NAME); } else { system "perl -S pod2text $PROGRAM_NAME" } defined $msg and print $msg; exit 0; } # **************************************************************************** # # DESCRIPTION # # Display default excludes. # # INPUT PARAMETERS # # None # # RETURN VALUES # # None # # **************************************************************************** sub HelpExclude () { my $id = "$LIB.HelpExclude"; print "Default path exclude regexp: '$DEFAULT_PATH_EXCLUDE'\n"; print "Default file exclude regexp: '$DEFAULT_FILE_EXCLUDE'\n"; } # **************************************************************************** # # DESCRIPTION # # Return current year YYYY. # # INPUT PARAMETERS # # None # # RETURN VALUES # # number YYYY # # **************************************************************************** sub Year () { my $id = "$LIB.Year"; 1900 + (localtime time() )[5]; } # **************************************************************************** # # DESCRIPTION # # Read command line arguments and their parameters. # # INPUT PARAMETERS # # None # # RETURN VALUES # # Globally set options. # # **************************************************************************** sub HandleCommandLineArgs () { my $id = "$LIB.HandleCommandLineArgs"; use vars qw ( $test $verb $debug $YEAR $OPT_AUTOMATIC @OPT_FILE_REGEXP_EXCLUDE @OPT_FILE_REGEXP_INCLUDE $OPT_FSF_ADDRESS $OPT_LINE_REGEXP $OPT_NO_YEAR $OPT_RECURSIVE $OPT_REGEXP ); Getopt::Long::config( qw ( no_ignore_case no_ignore_case_always )); my ( $help, $helpMan, $helpHtml, $version ); # local variables to function my ( $helpExclude, $code ); $debug = -1; GetOptions # Getopt::Long ( "a|auto" => \$OPT_AUTOMATIC , "fsf-address" => \$OPT_FSF_ADDRESS , "c|code" => \$code , "d|debug:i" => \$debug , "dry-run" => \$test , "help-exclude" => \$helpExclude , "help-html" => \$helpHtml , "help-man" => \$helpMan , "h|help" => \$help , "include=s" => \@OPT_FILE_REGEXP_INCLUDE , "line=s" => \$OPT_LINE_REGEXP , "r|recursive" => \$OPT_RECURSIVE , "R|regexp=s" => \$OPT_REGEXP , "test" => \$test , "v|verbose:i" => \$verb , "V|version" => \$version , "year=i" => \$YEAR , "Y|no-year" => \$OPT_NO_YEAR , "x|exclude=s" => \@OPT_FILE_REGEXP_EXCLUDE ); $version and die "$VERSION $CONTACT $LICENSE $URL\n"; $helpExclude and HelpExclude(); $help and Help(); $helpMan and Help(-man); $helpHtml and Help(-html); $version and Version(); $debug = 1 if $debug == 0; $debug = 0 if $debug < 0; $YEAR = Year() unless defined $YEAR; unless ( $YEAR =~ m,^\d{4}$, ) { die "$id: Option --year must be given with four digits [$YEAR]"; } if ( defined $verb and $verb == 0 ) { $verb = 1; } if ( $code ) { push @OPT_FILE_REGEXP_INCLUDE, '\.([Cch]|cc|hh|cpp|c\+\+|hpp|p[y]l|sh|rb)'; } $verb = 1 if $test and $verb == 0; $verb = 5 if $debug; if ( $OPT_LINE_REGEXP and $OPT_AUTOMATIC ) { die "$id: option --auto cannot be used togethet with --line"; } if ( $OPT_AUTOMATIC ) { if ( $NAME ) { local $ARG = $NAME; if ( /^([a-z-]+) +([a-z-]+)/i ) { $verb > 1 and print "$id: Using NAME: $NAME\n"; $OPT_LINE_REGEXP = "${1}[ \\t]+$2"; } else { $verb and print "$id: WARN: NAME not recognized: '$NAME'\n"; } } if ( not $OPT_LINE_REGEXP and $EMAIL ) { local $ARG = $EMAIL; if ( /^([a-z-]+)\.([a-z-]+)@/i ) { $verb > 1 and print "$id: Using EMAIL: $EMAIL\n"; $OPT_LINE_REGEXP = "${1}[ \\t]+$2"; } else { $verb and print "$id: WARN: EMAIL not recognized: '$EMAIL'\n"; } unless ( $OPT_LINE_REGEXP ) { die "$id: information for option --auto missing"; } } $verb > 1 and print "$id: automatic preset of --line '$OPT_LINE_REGEXP'\n"; } } # **************************************************************************** # # DESCRIPTION # # Change FSF Address # # INPUT PARAMETERS # # $content File content. # # RETURN VALUES # # $string File content or empty if no chnages. # # **************************************************************************** sub FsfAddress ( $ ; $ ) { my $id = "$LIB.FsfAddress"; local $ARG = shift; my $file = shift; my $X = $debug ? "$id: " : ""; my $done; s {^([^\r\n]*)You \s+ should \s+ have \s+ received .*? (write \s+ to | contact .*? Foundation) .*? USA[ \t.]* } {$1You should have received a copy of the GNU General Public License\n$1along with this program. If not, see .}smix and $done++; $ARG if $done; } # **************************************************************************** # # DESCRIPTION # # Handle Single file # # INPUT PARAMETERS # # %hash -file => [filename list] # -regexp => Regexp to match file content. # If regexp is not found in file, file is not # handled. # # RETURN VALUES # # none # # **************************************************************************** sub HandleFile ( % ) { my $id = "$LIB.HandleFile"; my %arg = @ARG; my $X = $debug ? "$id: " : ""; my @files = @{ $arg{-file} }; my $regexp = $arg{-regexp}; my $linere = $arg{-line}; unless ( @files ) { warn "$id: -file argument is empty: ", $arg{-file}; return; } $debug and print "$id: -file [@files], ", "-regexp '$regexp' ", "-line '$linere'\n" ; my $ffile; sub Print(@); local *Print = sub (@) { print "${X}$ffile: ", @_, "\n"; }; local $ARG; for my $file ( @files ) { $ffile = $file; # For Print() $debug and print "$id: $file: open\n"; # ..................................................... read ... { my $FILE; unless ( open my $FILE, "<", $file ) { $verb and Print "ERROR: cannot open"; next; } else { binmode $FILE; local $INPUT_RECORD_SEPARATOR = undef; $ARG = <$FILE>; close $FILE or warn "Close $file error $ERRNO"; unless ( /\w/ ) { $verb and Print "WARN: empty file"; return; } } } if ( $regexp ) { unless ( /$regexp/o ) { $verb and Print "WARN: failed regexp check: $regexp"; next; } } my $done; my $msg = $test ? "Would change" : "Changed"; if ( $OPT_FSF_ADDRESS and (my $fsf = FsfAddress $ARG, $file) ) { Print "$msg FSF address to URL"; $ARG = $fsf; $done++; } # Perl Unicode also would accpt x{a9}/, but \N{} is more readable # http://en.wikipedia.org/wiki/Copyright_symbol my $ch = encode("UTF-8", "\N{COPYRIGHT SIGN}"); my $sign = '(?:' . $ch . '|\([Cc]\))'; my $yyyy = '\d{4}'; my $copy = '(?:(?i)Copyright):?[ \t]+' . $sign . '[ \t]+' . $yyyy; # In manual pages the hyphen is quoted as: # Copyright (C) YYYY\-YYYY my $repeat = '\x5C?-'; # HEX 5C = backslash (\) # If we find the regexp, then check if YEAR is different # and finally do substitution. # # If everything went ok, replace file. unless ( /$copy$repeat($yyyy)/oi ) { $verb > 1 and Print "No Copyright line" ; $debug > 2 and print "$id: Match regexp: $copy$repeat($yyyy)\n"; } my $y = $1; $y = "" if $OPT_NO_YEAR; if ( $y and $y eq $YEAR ) { $verb > 2 and Print "Copyright is already $YEAR"; $y = ""; } unless ( $OPT_NO_YEAR ) { my $i = 0; if ( $linere ) { if ( $debug > 1 ) { warn "s/(?:$linere).*\\K($copy$repeat)($yyyy)/\${1}$YEAR/gmi\n"; warn "s/($copy$repeat)$yyyy(.*$linere)/\${1}$YEAR\${2}/gmi\n"; } s/(?:$linere).*\K($copy$repeat)$yyyy/$1$YEAR/gmi and $i++; s/($copy$repeat)$yyyy(.*$linere)/$1$YEAR$2/gmi and $i++; } else { s/($copy$repeat)$yyyy/$1$YEAR/gmi and $i++; } $done += $i; $debug and $i and print "$id: matches --line '$linere'\n"; $y = "" unless $i; } $verb and $y and Print "$msg $y => $YEAR"; $test and next; not $done and next; my $FILE; unless ( open $FILE, ">", $file ) { Print "ERROR: Cannot open for write"; } else { $verb > 2 and Print "wrote"; binmode $FILE; print $FILE $ARG; close $FILE or warn "Close $file error $ERRNO"; } } } # **************************************************************************** # # DESCRIPTION # # Check if FILE matches exclude regexps. # # INPUT PARAMETERS # # $ Filename # # RETURN VALUES # # true File in exclude list # false File NOT in exclude list # # **************************************************************************** sub IsExclude ($) { my $id = "$LIB.IsExclude"; local $ARG = shift; @OPT_FILE_REGEXP_EXCLUDE or return 0; for my $re ( @OPT_FILE_REGEXP_EXCLUDE ) { if ( /$re/ ) { $verb > 2 and print "$id: '$re' matches: $ARG\n"; return 1 } } return 0; } # **************************************************************************** # # DESCRIPTION # # Check if FILE matches include regexps. # # INPUT PARAMETERS # # $ Filename # # RETURN VALUES # # true File in include list # false File NOT in include list # # **************************************************************************** sub IsInclude ($) { my $id = "$LIB.IsInclude"; local $ARG = shift; @OPT_FILE_REGEXP_INCLUDE or return 1; for my $re ( @OPT_FILE_REGEXP_INCLUDE ) { if ( /$re/ ) { $verb > 2 and print "$id: '$re' matches: $ARG\n"; return 1 } } return 0; } # **************************************************************************** # # DESCRIPTION # # Recursively find out all files and change their content. # # INPUT PARAMETERS # # None. This function is called from File::FInd.pm library # # RETURN VALUES # # None. # # **************************************************************************** sub wanted () { my $id = "$LIB.wanted"; my $dir = $File::Find::dir; my $file = $File::Find::name; # complete path if ( $dir =~ m,$DEFAULT_PATH_EXCLUDE,o ) { $File::Find::prune = 1; $debug and print "$id: DEfault path exclude: $dir\n"; return; } if ( $file =~ m,$DEFAULT_FILE_EXCLUDE,o ) { $debug and print "$id: Default file exclude: $file\n"; return; } if ( -f ) { if ( $verb > 3 ) { print "$id: $file\n"; } unless ( -T ) { $debug and print "$id: Exclude binary file (internal test): $file\n"; } IsInclude $file or return; IsExclude $file and return; HandleFile -file => [$file], -line => $OPT_LINE_REGEXP, -regexp => $OPT_REGEXP; } } # **************************************************************************** # # DESCRIPTION # # Expand files in list. Win32 support # # INPUT PARAMETERS # # @ list of file glob patterns. # # RETURN VALUES # # @ list of filenames # # **************************************************************************** sub FileGlobs ( @ ) { my $id = "$LIB.FileGlobs"; my @list = @ARG; not @list and die "$id: No files to expand. Argument list is empty."; my @files; for my $glob ( @list ) { # Win32 can't expand "*". We must do it here. # Grep only FILES, not directories. push @files, grep { -f } glob $glob; } $debug and print "$id: RETURN [@files]\n"; @files; } # **************************************************************************** # # DESCRIPTION # # Main function # # INPUT PARAMETERS # # None # # RETURN VALUES # # None # # **************************************************************************** sub Main () { my $id = "$LIB.Main"; Initialize(); HandleCommandLineArgs(); unless ( @ARGV ) { die "What files to change? See --help."; } $debug and print "$id: ARGV [@ARGV]\n"; # .......................................... expand command line ... if ( $OPT_RECURSIVE ) { find( {wanted => \&wanted, no_chdir => 1}, @ARGV ); } else { my @files = FileGlobs @ARGV; unless (@files) { $verb and warn "[WARN] No files matching glob(s): @ARGV\n"; return; } HandleFile -file => [@files], -line => $OPT_LINE_REGEXP, -regexp => $OPT_REGEXP; } } Main(); # End of file copyright-update-2016.1018/doc/000077500000000000000000000000001300146301600160635ustar00rootroot00000000000000copyright-update-2016.1018/doc/manual/000077500000000000000000000000001300146301600173405ustar00rootroot00000000000000copyright-update-2016.1018/doc/manual/copyright-update.html000066400000000000000000000242461300146301600235260ustar00rootroot00000000000000

NAME

copyright-update - Update Copyright information in files

SYNOPSIS

  copyright-update [options] FILE [FILE ...]
  copyright-update [options] --recursive PATH [PATH ...]

DESCRIPTION

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.

OPTIONS

Run options

-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.

If neither NAME nor EMAIL exists in evenvironemt, 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.

-c, --code

Preset --include to match common code files: .c, .h, .cc, .hh, .cpp, .c++, .hpp, .C, .pl, .py, .sh and .rb

-d, --debug LEVEL

Turn on debug. Level can be in range 0-10.

-f, --fsf-address

Change License paragraphs that refer to FSF address. The FSF's current recommendation is to redirect inquiries about licences to their URL.

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/>.
-i, --include REGEXP

Include files matching regexp. The match is done against whole path.

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.

-l, --line REGEXP

Change only lines which match REGEXP. The match is case-insensitive.

-r, --recursive

Recursively search all directories given in command line.

-R, --regexp REGEXP

Change only files whose content matches REGEXP. 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 perlre(1) for more information about 'smi' and other modifiers.

This option can be used as a preliminary Content criteria, to select files before --line option finds the correct Copyright lines.

-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.

-x, --exclude REGEXP

Ignore files matching 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. Value must be four digits.

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.

-Y, --no-year

Disable updating year.

Miscellaneus options

-h, --help

Display help.

--help-exclude

Display default values used to exclude paths and files.

--help-html

Display help in HTML format.

--help-man

Display help in manual page man(1) format.

-V, --version

Display contact and version information.

EXAMPLES

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 \
        .

TROUBLESHOOTING

See option --debug.

ENVIRONMENT

EMAIL

In the form "firstname.lastname@example.com"; that is, without the angles <>. If set, the value is used in option --auto only if environment variable NAME is not set.

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
NAME

In the form "Firstname Lastname". If set, the value is used in option --auto.

FILES

None.

EXIT STATUS

Not defined.

SEE ALSO

licensecheck(1)

DEPENDENCIES

Uses only standard Perl modules.

BUGS AND LIMITATIONS

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.

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

AVAILABILITY

Homepage is at http://freecode.com/projects/copyright-update

AUTHOR

Jari Aalto

LICENSE AND COPYRIGHT

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/>.

copyright-update-2016.1018/doc/manual/copyright-update.txt000066400000000000000000000167301300146301600234000ustar00rootroot00000000000000NAME copyright-update - Update Copyright information in files SYNOPSIS copyright-update [options] FILE [FILE ...] copyright-update [options] --recursive PATH [PATH ...] DESCRIPTION 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. OPTIONS Run options -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. If neither NAME nor EMAIL exists in evenvironemt, 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. -c, --code Preset --include to match common code files: .c, .h, .cc, .hh, .cpp, .c++, .hpp, .C, .pl, .py, .sh and .rb -d, --debug LEVEL Turn on debug. Level can be in range 0-10. -f, --fsf-address Change License paragraphs that refer to FSF address. The FSF's current recommendation is to redirect inquiries about licences to their URL. 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 . -i, --include REGEXP Include files matching regexp. The match is done against whole path. 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. -l, --line REGEXP Change only lines which match REGEXP. The match is case-insensitive. -r, --recursive Recursively search all directories given in command line. -R, --regexp REGEXP Change only files whose content matches REGEXP. 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 perlre(1) for more information about 'smi' and other modifiers. This option can be used as a preliminary *Content criteria*, to select files before --line option finds the correct Copyright lines. -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. -x, --exclude REGEXP Ignore files matching 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. Value must be four digits. 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. -Y, --no-year Disable updating year. Miscellaneus options -h, --help Display help. --help-exclude Display default values used to exclude paths and files. --help-html Display help in HTML format. --help-man Display help in manual page man(1) format. -V, --version Display contact and version information. EXAMPLES 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 \ . TROUBLESHOOTING See option --debug. ENVIRONMENT EMAIL In the form "firstname.lastname@example.com"; that is, without the angles <>. If set, the value is used in option --auto only if environment variable NAME is not set. 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 NAME In the form "Firstname Lastname". If set, the value is used in option --auto. FILES None. EXIT STATUS Not defined. SEE ALSO licensecheck(1) DEPENDENCIES Uses only standard Perl modules. BUGS AND LIMITATIONS 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. 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 AVAILABILITY Homepage is at http://freecode.com/projects/copyright-update AUTHOR Jari Aalto LICENSE AND COPYRIGHT 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 .