summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2007-06-16 16:50:21 +0000
committerNorbert Preining <preining@logic.at>2007-06-16 16:50:21 +0000
commite3d3af66f2e33462ee7e05c804958bc606eceaa0 (patch)
treec4f54dcfbc4b49eac987b724df2266a05a7179aa /Master
parentaee3178272c79bb57bbba3be23e91b6df2a29138 (diff)
update and convert and pod-ify one more script
git-svn-id: svn://tug.org/texlive/trunk@4444 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/tlpkg/bin/create-package-list.pl73
1 files changed, 66 insertions, 7 deletions
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<create-package-list> 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 <F<preining@logic.at>> for the TeX Live distribution and both
+are licensed under the GNU General Public License Version 2 or later.
+
+=cut
+