From fdf9df957467b36108266e9069ce61356a53ded1 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 16 Oct 2007 18:08:31 +0000 Subject: regularize conventions git-svn-id: svn://tug.org/texlive/trunk@5208 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/bin/tlpdb2list | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/Master/tlpkg/bin/tlpdb2list b/Master/tlpkg/bin/tlpdb2list index 290303eca46..2904b534103 100755 --- a/Master/tlpkg/bin/tlpdb2list +++ b/Master/tlpkg/bin/tlpdb2list @@ -20,31 +20,26 @@ use Getopt::Long; use Pod::Usage; use File::Path; - my $opt_outputdir = "new-list"; our $opt_debug = 0; my $man = 0; my $help = 0; -GetOptions("debug!", # debug mode - "outputdir=s" => \$opt_outputdir, - 'help|?' => \$help, man => \$man - ) or pod2usage(2); - +GetOptions("outputdir=s" => \$opt_outputdir, + "debug!", "help|?" => \$help, "man" => \$man) or pod2usage(2); + pod2usage(1) if $help; pod2usage(-exitstatus => 0, -verbose => 2) if $man; pod2usage(1) if ($#ARGV<0); -if (! -d "$opt_outputdir") { - mkpath("$opt_outputdir") or die "Cannot mkdir $opt_outputdir!"; -} - - -die "Cannot read tlpdb file $ARGV[0]." if (! -r "$ARGV[0]"); +if (! -d $opt_outputdir) { + mkpath ($opt_outputdir) or die "cannot mkdir $opt_outputdir: $!"; +} -my $tldb = new TeXLive::TLPDB ( location => "$ARGV[0]" ); +die "cannot read tlpdb $ARGV[0]." if (! -r "$ARGV[0]"); -$tldb->generate_listfiles($opt_outputdir); +my $tlpdb = new TeXLive::TLPDB (location => $ARGV[0]); +$tlpdb->generate_listfiles ($opt_outputdir); __END__ -- cgit v1.2.3