From e3d3af66f2e33462ee7e05c804958bc606eceaa0 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 16 Jun 2007 16:50:21 +0000 Subject: update and convert and pod-ify one more script git-svn-id: svn://tug.org/texlive/trunk@4444 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/bin/create-package-list.pl | 73 +++++++++++++++++++++++++++++---- 1 file changed, 66 insertions(+), 7 deletions(-) (limited to 'Master') diff --git a/Master/tlpkg/bin/create-package-list.pl b/Master/tlpkg/bin/create-package-list.pl index 1f2b4906b39..acac8393252 100644 --- a/Master/tlpkg/bin/create-package-list.pl +++ b/Master/tlpkg/bin/create-package-list.pl @@ -1,23 +1,82 @@ #!/usr/bin/env perl -w # # create-package-list.pl -# Create thepackage list of the current installation +# Create the package list of the current installation # Copyright 2007 Norbert Preining # # This file is licensed under the GNU General Public Licence version 2 # or any later version +BEGIN { + ($mydir = $0) =~ s,/[^/]*$,,; + unshift (@INC, "$mydir/.."); +} + use strict; -use TLDB; -use Data::Dumper; +use TeXLive::TLPDB; +use Getopt::Long; +use Pod::Usage; + +our $opt_debug = 0; +my $man = 0; +my $help = 0; + +GetOptions("debug!", 'help|?' => \$help, man => \$man ) or pod2usage(2); +pod2usage(1) if $help; +pod2usage(-exitstatus => 0, -verbose => 2) if $man; +pod2usage(1) if ($#ARGV<0); -my $TLRoot = "."; -my $tldblocation = "$TLRoot/local.tldb"; +die "Cannot read tldb file $ARGV[0]." if (! -r "$ARGV[0]"); -my $tldb = TLDB->new; -$tldb->from_file($tldblocation); +my $tldb = new TeXLive::TLPDB ( location => "$ARGV[0]" ); $tldb->generate_packagelist; +__END__ + +=head1 NAME + +create-package-list.pl - Generates a list of packages with revisions + +=head1 SYNOPSIS + +create-package-list.pl [options] texlive.tldb + + Options: + -help brief help message + -man full documentation + -debug get debug messages from TL* modules + +=head1 OPTIONS + +=over 8 + +=item B<-help> + +Print a brief help message and exits. + +=item B<-man> + +Prints the manual page and exits. + +=item B<-debug> + +Give debug messages from the TeX Live modules + +=back + +=head1 DESCRIPTION + +B generates the list of packages with revisions +from the TeX Live Database specified on the command line. + +=head1 AUTHORS AND COPYRIGHT + +This script and its documentation was written by +Norbert Preining > for the TeX Live distribution and both +are licensed under the GNU General Public License Version 2 or later. + +=cut + -- cgit v1.2.3