diff options
Diffstat (limited to 'Master/texmf-dist/scripts')
-rwxr-xr-x | Master/texmf-dist/scripts/texlive/tlmgr.pl | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl index 699b71c2bf6..77230c6c798 100755 --- a/Master/texmf-dist/scripts/texlive/tlmgr.pl +++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl @@ -1,7 +1,7 @@ #!/usr/bin/env perl # $Id$ # -# Copyright 2008-2014 Norbert Preining +# Copyright 2008-2015 Norbert Preining # This file is licensed under the GNU General Public License version 2 # or any later version. @@ -161,6 +161,7 @@ sub main { "rebuild-sys" => 1 }, "get-mirror" => { }, "gui" => { "load" => 1 }, + "help" => { }, "info" => { "list" => 1, "only-installed" => 1 }, "install" => { "dry-run|n" => 1, @@ -275,6 +276,10 @@ sub main { exit 0; } + if (defined($action) && $action && !exists $actionoptions{$action}) { + die "$prg: unknown action: $action; try --help if you need it.\n"; + } + if ((!defined($action) || !$action) && !$opts{"help"} && !$opts{"h"}) { die "$prg: missing action; try --help if you need it.\n"; } @@ -292,9 +297,8 @@ sub main { @noperldoc = ("-noperldoc", "1"); } else { # checking only for the existence of perldoc is not enough - # because stupid Debian/Ubuntu ships a stub that does nothing - # which is very very bad idea - # try to check for that, too + # because Debian/Ubuntu unfortunately ship a stub that does nothing; + # try to check for that, too. my $ret = system("perldoc -V >/dev/null 2>&1"); if ($ret == 0) { debug("working perldoc found, using it\n"); @@ -609,7 +613,7 @@ sub execute_action { action_recreate_tlpdb(); finish(0); } else { - die "$prg: unknown action: $action; try --help if you need it.\n"; + die "$prg: unknown action $action; try --help if you need it.\n"; } # close the special log file |