summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2015-04-22 00:21:41 +0000
committerNorbert Preining <preining@logic.at>2015-04-22 00:21:41 +0000
commit0886eccf2c735042a838c9d490f423facc95ac57 (patch)
treec035825f9029925114e5fa9c795101737cb814ca /Master
parent59ba21f04803e1bffaa312756d76bd53c1c5774e (diff)
move action massaging above warning
git-svn-id: svn://tug.org/texlive/trunk@36997 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/tlmgr.pl38
1 files changed, 21 insertions, 17 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl
index 9e97b620a67..824e45600ed 100755
--- a/Master/texmf-dist/scripts/texlive/tlmgr.pl
+++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl
@@ -279,11 +279,27 @@ sub main {
exit 0;
}
- # we cannot warn now, as we do some action massaging down there
- # to get this real needs some more work
- # if (defined($action) && $action && !exists $actionoptions{$action}) {
- # die "$prg: unknown action: $action; try --help if you need it.\n";
- # }
+ #
+ # ACTION massaging
+ # for backward compatibility and usability
+
+ # unify arguments so that the $action contains paper in all cases
+ # and push the first arg back to @ARGV for action_paper processing
+ if ($action =~ /^(paper|xdvi|psutils|pdftex|dvips|dvipdfmx?|context)$/) {
+ unshift(@ARGV, $action);
+ $action = "paper";
+ }
+
+ # backward compatibility with action "show" and "list" from before
+ if ($action =~ /^(show|list)$/) {
+ $action = "info";
+ }
+
+ # now $action should be part of %actionoptions, otherwise this is
+ # an error
+ 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";
@@ -353,18 +369,6 @@ for the full story.\n";
}
}
- # unify arguments so that the $action contains paper in all cases
- # and push the first arg back to @ARGV for action_paper processing
- if ($action =~ /^(paper|xdvi|psutils|pdftex|dvips|dvipdfmx?|context)$/) {
- unshift(@ARGV, $action);
- $action = "paper";
- }
-
- # backward compatibility with action "show" and "list" from before
- if ($action =~ /^(show|list)$/) {
- $action = "info";
- }
-
# --machine-readable is only supported by update.
if ($::machinereadable &&
$action ne "update" && $action ne "install" && $action ne "option") {