Code Search for Developers
 
 
  

fix_copyright.pl from Gtk-Gnutella at Krugle


Show fix_copyright.pl syntax highlighted

#!/usr/bin/perl
	eval 'exec perl5 -S $0 ${1+"$@"}'
		if $running_under_some_shell;

#
# $Id: fix_copyright.pl 9831 2005-10-24 17:33:50Z cbiere $
#
# Copyright (c) 2003, Raphael Manfredi
#
# Fix copyright of source files, in place, by extending the year range
# if needed for lines bearing the copyright of active developers.
#
#----------------------------------------------------------------------
# This file is part of gtk-gnutella.
#
#  gtk-gnutella 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.
#
#  gtk-gnutella 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 gtk-gnutella; if not, write to the Free Software
#  Foundation, Inc.:
#      59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#----------------------------------------------------------------------
#

my @DEVS = (
	"Raphael Manfredi",
	"Jeroen Asselman",
);

my $COPYRIGHT = "Copyright \\(c\\)";
$^I = '';

my $year = 1900 + (localtime(time))[5];

while (<>) {
	my $found = 0;
	if (/$COPYRIGHT/o) {
		foreach my $dev (@DEVS) {
			$found++ if /$dev/;
			last if $found;
		}
	}
	if ($found) {
		if (/$COPYRIGHT (\d+),/o) {
			s/^(.*?$COPYRIGHT \d+),/$1-$year,/o if $year > $1;
		} elsif (/$COPYRIGHT \d+-(\d+),/o) {
			s/^(.*?$COPYRIGHT \d+)-\d+,/$1-$year,/o if $year > $1;
		}
	}
	print;
}





See more files for this project here

Gtk-Gnutella

A GTK+ Gnutella client for Unix, efficient, reliable and fast, written in C. It has been optimized for speed and scalability, with low-memory consumption. It is meant to be left running 24x7, using little CPU and only the configured bandwidth.

Project homepage: http://sourceforge.net/projects/gtk-gnutella
Programming language(s): C
License: other

  fix_copyright.pl
  geo-to-db.pl
  gtkg-dbus-listener.py
  magnet-handler.sh
  magnetize.sh
  sha1_cache.pl
  sha1_cache.sh
  svn-revision