[Po4a-commits] "po4a Build.PL,1.26,1.27"

Nicolas FRANCOIS nekral-guest at alioth.debian.org
Sat Apr 8 14:27:44 UTC 2006


Update of /cvsroot/po4a/po4a
In directory haydn:/tmp/cvs-serv14578

Modified Files:
	Build.PL 
Log Message:
Now that some scripts are not installed in the root directory, we need to
use the basename of the script.


Index: Build.PL
===================================================================
RCS file: /cvsroot/po4a/po4a/Build.PL,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- Build.PL	8 Apr 2006 14:23:33 -0000	1.26
+++ Build.PL	8 Apr 2006 14:27:42 -0000	1.27
@@ -132,6 +132,7 @@
 
 	    $self->depends_on('manpo');
 	    use Pod::Man;
+	    use File::Basename;
 
 	    my %charsets = ( 'default' => 'iso8859-1',
 	                     'pl'      => 'iso8859-2'
@@ -159,13 +160,14 @@
 	        my $charset = defined $charsets{$lang} ? $charsets{$lang} : $charsets{'default'};
 		print ("X Translate binary manpages to $lang\n");
 		foreach $file (keys(%{$self->script_files()})) {
-		    system("PERL5LIB=lib perl po4a-translate $options -L $charset -m $file -p po/pod/$lang.po -l blib/man/$file -a doc/addendum.$lang")
+		    my $man = basename $file;
+		    system("PERL5LIB=lib perl po4a-translate $options -L $charset -m $file -p po/pod/$lang.po -l blib/man/$man -a doc/addendum.$lang")
 		      && die;
-		    if (-e "blib/man/$file") {
+		    if (-e "blib/man/$man") {
 			system("mkdir -p blib/man/$lang/man1") && die;
-			$parser->parse_from_file ("blib/man/$file", "blib/man/$lang/man1/$file.1p");
-			system("gzip -9 blib/man/$lang/man1/$file.1p") && die;
-			system("rm -f blib/man/$file")&& die;
+			$parser->parse_from_file ("blib/man/$man", "blib/man/$lang/man1/$man.1p");
+			system("gzip -9 blib/man/$lang/man1/$man.1p") && die;
+			system("rm -f blib/man/$man")&& die;
 		    }
 		}
 	    }




More information about the Po4a-commits mailing list