[debian-edu-commits] debian-edu/ 01/01: Extend scripts/get_copyright to handle the ITIL documentation.

Petter Reinholdtsen pere at moszumanska.debian.org
Thu May 19 08:45:50 UTC 2016


This is an automated email from the git hooks/post-receive script.

pere pushed a commit to branch master
in repository debian-edu-doc.

commit 721d83b6919c41796137b603a67e92cad40b4f74
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Thu May 19 10:45:46 2016 +0200

    Extend scripts/get_copyright to handle the ITIL documentation.
---
 debian/changelog                    |  5 +----
 documentation/scripts/get_copyright | 13 ++++++++-----
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index ccc6c72..8b5cb3f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,10 +3,7 @@ debian-edu-doc (1.900~20160519~9+edu0) UNRELEASED; urgency=medium
   [ Petter Reinholdtsen ]
   * Add ITIL documentation, now that it is translated to English
     and the authorative source is the English version in the wiki.
-  FIXME: before upload to sid, debian/copyright should be updated to include
-  the ITIL documentation. Also the "update-copyright" target in Makefile
-  should be taught to deal with the copyright of this document (or, if that's
-  not feasable, to ignore it.)
+  * Extend scripts/get_copyright to handle the ITIL documentation.
 
   [ Holger Levsen ]
   * Bump version number to indicate this is the stretch branch.
diff --git a/documentation/scripts/get_copyright b/documentation/scripts/get_copyright
index 1424fa8..1b2f684 100755
--- a/documentation/scripts/get_copyright
+++ b/documentation/scripts/get_copyright
@@ -27,6 +27,7 @@ my %langs = (
 	'French'	=> 'fr',
 	'Italian'	=> 'it',
 	'Bokmål'	=> 'nb',
+	'Norwegian Bokmål' => 'nb',
 	'Dutch'		=> 'nl',
 	'Traditional Chinese'	=> 'zh'
 );
@@ -57,14 +58,16 @@ sub copyright ($) {
 	return $result;
 }
 
-system("wget -q '$base/$path/$name' -O - | sed \"s/<p/\\n<p/g\" > '$file'");
+my $url = "$base/$path/$name";
+print "Fetching $url\n";
+system("wget -q '$url' -O - | sed \"s/<p/\\n<p/g\" > '$file'");
 
 my $buffer;
 open(FILE, "< $file") or die "Can't open $file perhaps not in the correct dir? Error: $!";
 while(<FILE>){
 	my $short = $cdir;
 	$short =~ s/-manual//;
-	if ($_ =~ m/This document is written and copyrighted by (.*?) and is released under the GPL2 or any later version\./){
+	if ($_ =~ m/This document is written and copyrighted by (.*?) and is released under the GPL(\d+) or any later version\./){
 	    if ($type eq 'dbk') {
 		$buffer = "<!-- START en -->\n";
 		$buffer .= copyright($1);
@@ -72,10 +75,10 @@ while(<FILE>){
 	    } else {
 		$buffer = "Files: documentation/$short/$cdir.xml documentation/$short/$cdir.pot\n";
 		$buffer .= "Copyright:".copyright($1);
-		$buffer .= "License: GPL-2+\n\n";
+		$buffer .= "License: GPL-$2+\n\n";
 	    }
 	}
-	elsif ($_ =~ m/The (.*?) translation is copyrighted by (.*?) and is released under the GPL v2 or any later version\./){
+	elsif ($_ =~ m/The (.*?) translation is copyrighted by (.*?) and is released under the GPL v(\d+) or any later version\./){
 	    if ($type eq 'dbk') {
 		$buffer .= "<!-- START $langs{$1} -->\n";
 		$buffer .= copyright($2);
@@ -83,7 +86,7 @@ while(<FILE>){
 	    } else {
 		$buffer .= "Files: documentation/$short/$cdir.$langs{$1}.po\n";
 		$buffer .= "Copyright:".copyright($2);
-		$buffer .= "License: GPL-2+\n\n";
+		$buffer .= "License: GPL-$3+\n\n";
 	    }
 	}
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu-doc.git



More information about the debian-edu-commits mailing list