diff options
Diffstat (limited to 'Master')
-rwxr-xr-x | Master/tlpkg/bin/tlpfiles | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/Master/tlpkg/bin/tlpfiles b/Master/tlpkg/bin/tlpfiles index e086d02d907..b42e83ad3f8 100755 --- a/Master/tlpkg/bin/tlpfiles +++ b/Master/tlpkg/bin/tlpfiles @@ -28,9 +28,11 @@ our %DB_BY_FILE; # used privately below. our @opt_pkgof = (); my $opt_help = 0; +my $opt_fullpath = 0; TeXLive::TLUtils::process_logging_options (); GetOptions ("pkgof=s" => \@opt_pkgof, + "fullpath" => \$opt_fullpath, "help|?" => \$opt_help) or pod2usage (2); pod2usage ("-exitstatus" => 0, "-verbose" => 2) if $opt_help; @@ -107,15 +109,23 @@ sub find_pkg_of_file (undef,$pkg) = split (/ /); } elsif (/^ /) { # we carefully designed the format so that the only lines with - # leading spaces are the files. here we just take the basename. - (my $dbfile = $_) =~ s,^.*/,,; + # leading spaces are the files. + # By default we take only the basename, unless $opt_fullpath + my $dbfile = $_; + if ($opt_fullpath) { + $dbfile =~ s,^ ,,; + } else { + $dbfile =~ s,^.*/,,; + } $DB_BY_FILE{$dbfile} .= "$pkg "; } } close (FILE) || warn "close($FILE) failed: $!"; } - $file =~ s,^.*/,,; # take basename + if (!$opt_fullpath) { + $file =~ s,^.*/,,; # take basename + } # strict stupidity my $ret = exists $DB_BY_FILE{$file} ? substr ($DB_BY_FILE{$file}, 0, -1) @@ -142,6 +152,12 @@ tlpfiles - list files contained in a TeX Live package, or vice versa Output the TeX Live package(s) in which each I<file> is contained. +=item B<-fullpath> + +By default C<-pkgof> uses only the basename of I<file> for comparison. +With this option given, comparision/search is based on the full path +names. + =item B<-help> Print this documentation and exit. |