From: Sam H. v. a. <we...@ma...> - 2007-09-25 17:49:16
|
Log Message: ----------- handle files that are not in a subdirectory of the source root dir Modified Files: -------------- admintools: ww-make-docs Revision Data ------------- Index: ww-make-docs =================================================================== RCS file: /webwork/cvs/system/admintools/ww-make-docs,v retrieving revision 1.1 retrieving revision 1.2 diff -Lww-make-docs -Lww-make-docs -u -r1.1 -r1.2 --- ww-make-docs +++ ww-make-docs @@ -37,7 +37,7 @@ my $dest_root = $self->{dest_root}; my $dest_url = $self->{dest_url}; - my ($subdir, $filename) = $pod_path =~ m|^$source_root/(.*)/(.*)$|; + my ($subdir, $filename) = $pod_path =~ m|^$source_root/(?:(.*)/)?(.*)$|; if ($filename =~ /\.pl$/) { $filename .= '.html'; } elsif ($filename =~ /\.pod$/) { @@ -45,7 +45,7 @@ } elsif ($filename =~ /\.pm$/) { $filename =~ s/\.pm$/.html/; } - my $html_dir = "$dest_root/$subdir"; + my $html_dir = defined $subdir ? "$dest_root/$subdir" : $dest_root; my $html_path = "$html_dir/$filename"; #print "$pod_path -- $pod_name\n"; |