summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2013-08-29 01:40:31 +0000
committerNorbert Preining <preining@logic.at>2013-08-29 01:40:31 +0000
commit0779968b7119535be7fc04eb6a2c52003ae6b225 (patch)
treeade7a313c3fbc4b5b72803893f3a8a26d07393ac
parent534c8041d641c0544a7bf285ffdecbb5f46c517a (diff)
tl-merge-tlpddL add --quiet command line
git-svn-id: svn://tug.org/texlive/trunk@31535 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xMaster/tlpkg/libexec/tl-merge-tlpdb26
1 files changed, 19 insertions, 7 deletions
diff --git a/Master/tlpkg/libexec/tl-merge-tlpdb b/Master/tlpkg/libexec/tl-merge-tlpdb
index 0a52f10425b..6fb90e6f415 100755
--- a/Master/tlpkg/libexec/tl-merge-tlpdb
+++ b/Master/tlpkg/libexec/tl-merge-tlpdb
@@ -37,12 +37,14 @@ use Digest::MD5;
use Getopt::Long qw(:config no_autoabbrev);
use Pod::Usage;
+my $opt_quiet = 0;
my $opt_save = 0;
my $opt_help = 0;
my $opt_nocleanup = 0;
GetOptions(
"save" => \$opt_save,
"nocleanup" => \$opt_nocleanup,
+ "quiet|q" => \$opt_quiet,
"help|h|?" => \$opt_help) or pod2usage(1);
if ($opt_help) {
@@ -55,12 +57,14 @@ if ($#ARGV != 0) {
my ($to_merge_tlpdbroot) = @ARGV;
-printf STDERR "loading main tlpdb from $tlnetroot ...\n";
+printf STDERR "loading main tlpdb from $tlnetroot ...\n"
+ unless $opt_quiet;
my $main_tlpdb = TeXLive::TLPDB->new(root => $tlnetroot);
if (!defined($main_tlpdb)) {
die "Cannot load main tlpdb from $tlnetroot: $!";
}
-printf STDERR "loading to merge tlpdb from $to_merge_tlpdbroot ...\n";
+printf STDERR "loading to merge tlpdb from $to_merge_tlpdbroot ...\n"
+ unless $opt_quiet;
my $sub_tlpdb = TeXLive::TLPDB->new(root => $to_merge_tlpdbroot);
if (!defined($sub_tlpdb)) {
die "Cannot load to merge tlpdb from $to_merge_tlpdbroot: $!";
@@ -85,7 +89,8 @@ for my $p ($sub_tlpdb->list_packages()) {
#
if ($opt_save) {
- printf STDERR "overwriting main tlpdb ...\n";
+ printf STDERR "overwriting main tlpdb ...\n"
+ unless $opt_quiet;
$main_tlpdb->save();
if (!$opt_nocleanup) {
# update the md5sum
@@ -102,12 +107,15 @@ if ($opt_save) {
unlink "$tlnetroot/tlpkg/texlive.tlpdb.xz";
}
} else {
- printf STDERR "writing generated tlpdb to stdout ...\n";
+ printf STDERR "writing generated tlpdb to stdout ...\n"
+ unless $opt_quiet;
$main_tlpdb->writeout();
}
-printf STDERR "Don't forget to actually copy the files from the archive dir!\n";
-printf STDERR "Finished.\n";
+if (!$opt_quiet) {
+ printf STDERR "Don't forget to actually copy the files from the archive dir!\n"
+ printf STDERR "Finished.\n";
+}
exit 0;
@@ -132,7 +140,7 @@ tl-merge-tlpdb - merge a tlpdb into another
=head1 SYNOPSIS
-tl-merge-tlpdb [--save|--help|-?] I<from-tlpdb-root>
+tl-merge-tlpdb [--save|--help|-?|--quiet|-q] I<from-tlpdb-root>
=head1 DESCRIPTION
@@ -172,6 +180,10 @@ into a web service.
Giving the option B<-nocleanup> prevents the script from executing
these steps.
+=item B<-quiet>, B<--quiet>, B<-q>
+
+Do not give any informative messages besides errors.
+
=item B<-help>, B<--help>, B<-h>, B<-?>
Display this help and exit.