[Rt-commit] r11694 - rt/branches/3.8-TESTING/sbin
ruz at bestpractical.com
ruz at bestpractical.com
Fri Apr 11 15:52:28 EDT 2008
Author: ruz
Date: Fri Apr 11 15:52:26 2008
New Revision: 11694
Modified:
rt/branches/3.8-TESTING/sbin/license_tag
Log:
* add check for another license in tagger
Modified: rt/branches/3.8-TESTING/sbin/license_tag
==============================================================================
--- rt/branches/3.8-TESTING/sbin/license_tag (original)
+++ rt/branches/3.8-TESTING/sbin/license_tag Fri Apr 11 15:52:26 2008
@@ -115,6 +115,8 @@
open(FILE,"<$pm") || die "Failed to open $pm";
my $file = (join "", <FILE>);
close (FILE);
+ return if another_license($file);
+
my $pmlic = $LICENSE;
$pmlic =~ s/^/%# /mg;
@@ -147,6 +149,8 @@
open(FILE,"<$pm") || die "Failed to open $pm";
my $file = (join "", <FILE>);
close (FILE);
+ return if another_license($file);
+
my $pmlic = $LICENSE;
$pmlic =~ s/^/# /mg;
@@ -180,6 +184,8 @@
open(FILE,"<$pm") || die "Failed to open $pm";
my $file = (join "", <FILE>);
close (FILE);
+ return if another_license($file);
+
my $pmlic = $LICENSE;
$pmlic =~ s/^/# /mg;
@@ -213,6 +219,8 @@
open(FILE,"<$pm") || die "Failed to open $pm";
my $file = (join "", <FILE>);
close (FILE);
+ return if another_license($file);
+
my $pmlic = $LICENSE;
$pmlic =~ s/^/# /msg;
@@ -241,3 +249,11 @@
}
+sub another_license {
+ my $file = shift;
+ if ( $file =~ /\bcopyright\b/i && $file !~ /Copyright\s+(c)\s+\d\d\d\d-\d\d\d\d Best Practical Solutions/ ) {
+ return 1;
+ }
+ return 0;
+}
+
More information about the Rt-commit
mailing list