summaryrefslogtreecommitdiff
path: root/Master/texmf/scripts/texlive/tlmgr.pl
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2011-10-26 12:44:57 +0000
committerNorbert Preining <preining@logic.at>2011-10-26 12:44:57 +0000
commitfcaa4386bffed23b84f5b155098c376dd33f5f7b (patch)
treeb8e6de196ae3d65569d7eb07549fd2045d52e1dd /Master/texmf/scripts/texlive/tlmgr.pl
parent9b67260f517b1de05ad3496e53c653d25d5d3023 (diff)
Make tlmgr -h give a short help with the list of actions, and tell
more what to do. git-svn-id: svn://tug.org/texlive/trunk@24409 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf/scripts/texlive/tlmgr.pl')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl29
1 files changed, 25 insertions, 4 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index d97ff94f876..30570fcba21 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -127,9 +127,14 @@ sub main {
"pause" => 1,
"print-platform|print-arch" => 1,
"version" => 1,
- "help|h|?" => 1);
+ "help" => 1,
+ "h|?" => 1);
my %actionoptions = (
+ "get-mirror" => { },
+ "option" => { },
+ "conf" => { },
+ "version" => { },
"backup" => { "backupdir" => "=s",
"clean" => ":-99",
"all" => 1,
@@ -256,11 +261,11 @@ sub main {
exit 0;
}
- if ((!defined($action) || !$action) && !$opts{"help"}) {
+ if ((!defined($action) || !$action) && !$opts{"help"} && !$opts{"h"}) {
die "$0: missing action; try --help if you need it.\n";
}
- if ($opts{"help"}) {
+ if ($opts{"help"} || $opts{"h"}) {
# perldoc does ASCII emphasis on the output, so it's nice to use it.
# But not all Unix platforms have it, and on Windows our Config.pm
# can apparently interfere, so always skip it there.
@@ -282,7 +287,23 @@ sub main {
pod2usage(-exitstatus => 0, -verbose => 99,
-sections => "NAME|SYNOPSIS|ACTIONS/$action.*" , @noperldoc);
} else {
- pod2usage(-exitstatus => 0, -verbose => 2, @noperldoc);
+ if ($opts{"help"}) {
+ pod2usage(-exitstatus => 0, -verbose => 2, @noperldoc);
+ } else {
+ # give a short message about usage
+ print "
+tlmgr revision $tlmgrrevision
+usage: tlmgr <options> <action> <arguments>
+where <action> is one of:\n";
+ for my $k (sort keys %actionoptions) {
+ print " $k\n";
+ }
+ print "\nUse\n tlmgr <action> --help
+for more details on a specific option, and
+ tlmgr --help
+for the full story.\n";
+ exit 0;
+ }
}
}