[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp/Texinfo/Convert Converter.pm HTML.pm
From: |
Patrice Dumas |
Subject: |
texinfo/tp/Texinfo/Convert Converter.pm HTML.pm |
Date: |
Thu, 08 Sep 2011 21:13:08 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 11/09/08 21:13:08
Modified files:
tp/Texinfo/Convert: Converter.pm HTML.pm
Log message:
Set output directory correctly when split.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Converter.pm?cvsroot=texinfo&r1=1.34&r2=1.35
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/HTML.pm?cvsroot=texinfo&r1=1.147&r2=1.148
Patches:
Index: Converter.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Converter.pm,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- Converter.pm 6 Sep 2011 20:20:44 -0000 1.34
+++ Converter.pm 8 Sep 2011 21:13:07 -0000 1.35
@@ -302,6 +302,7 @@
and
defined($self->{'extra'}->{'setfilename'}->{'extra'}->{'text_arg'}));
my $document_name;
+ my $set_outfile = $self->get_conf('OUTFILE');
# determine output file and output file name
my $outfile;
if (!defined($self->get_conf('OUTFILE'))) {
@@ -350,16 +351,31 @@
$document_name =~ s/\.[^\.]*$//;
}
}
- #Â FIXME use a specific configuration variable (TOP_FILE, PREFIX)?
+ # FIXME use a specific configuration variable (TOP_FILE, PREFIX)?
$document_name =~ s/^.*\///;
$self->{'document_name'} = $document_name;
$output_basename =~ s/^.*\///;
$self->{'output_filename'} = $output_basename;
+ if ($self->get_conf('SPLIT')) {
+ if (defined($set_outfile)) {
+ $self->{'destination_directory'} = $self->get_conf('OUTFILE');
+ } elsif (defined($self->get_conf('SUBDIR'))) {
+ $self->{'destination_directory'} = $self->get_conf('SUBDIR');
+ } else {
+ $self->{'destination_directory'} = $output_basename;
+ }
+ } else {
my $output_dir = $self->get_conf('OUTFILE');
$output_dir =~ s|[^/]*$||;
if ($output_dir ne '') {
$self->{'destination_directory'} = $output_dir;
}
+ }
+ if (defined($self->{'destination_directory'})
+ and $self->{'destination_directory'} ne '') {
+ $self->{'destination_directory'} =~ s/\/*$//;
+ $self->{'destination_directory'} .= '/';
+ }
}
# This is not used as code, but used to mark months as strings to be
Index: HTML.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/HTML.pm,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -b -r1.147 -r1.148
--- HTML.pm 4 Sep 2011 20:43:07 -0000 1.147
+++ HTML.pm 8 Sep 2011 21:13:08 -0000 1.148
@@ -5861,10 +5861,6 @@
# this sets OUTFILE, to be used if not split, but also
# 'destination_directory' and 'output_filename' that are useful when split.
$self->_set_outfile();
- if (!defined($self->{'destination_directory'}) and $self->get_conf('SPLIT')
- and $self->{'document_name'} ne '') {
- $self->{'destination_directory'} = $self->{'document_name'}.'/';
- }
return undef unless $self->_create_destination_directory();
# collect renamed nodes
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/tp/Texinfo/Convert Converter.pm HTML.pm,
Patrice Dumas <=