summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-10-16 18:08:31 +0000
committerKarl Berry <karl@freefriends.org>2007-10-16 18:08:31 +0000
commitfdf9df957467b36108266e9069ce61356a53ded1 (patch)
treef3786c5c1a5c171df51cb7d0a8983ada39182733
parentf4c48352cfd1adb2fa498be3aba33f90a3d731c3 (diff)
regularize conventions
git-svn-id: svn://tug.org/texlive/trunk@5208 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xMaster/tlpkg/bin/tlpdb2list23
1 files 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__