summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-06-13 22:46:54 +0000
committerKarl Berry <karl@freefriends.org>2010-06-13 22:46:54 +0000
commit1e061dc1f18cae400e3c78bc7cb96a839180190d (patch)
tree0d7d3c0b3b2bc2ee5f82b1e0d2153c1093c2c5e6
parent6019a96432ef8427e402459751109c8b14ec0454 (diff)
make both print-arch and -print-arch work;
reform/resort %actionoptions. git-svn-id: svn://tug.org/texlive/trunk@18956 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl104
1 files changed, 55 insertions, 49 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index 8a4deabcb24..321cd33f8ac 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -130,57 +130,58 @@ sub main {
"persistent-downloads" => "!",
"no-execute-actions" => 1,
"pause" => 1,
+ "print-arch" => 1,
"version" => 1,
"help|h|?" => 1);
my %actionoptions = (
- "remove" => { "no-depends" => 1,
- "no-depends-at-all" => 1,
- "force" => 1,
- "dry-run|n" => 1 },
- "show" => { "list" => 1 },
- "list" => { "only-installed" => 1 },
- "search" => { "global" => 1,
- "file" => 1 },
- "restore" => { "backupdir" => "=s",
- "dry-run|n" => 1,
- "all" => 1,
- "force" => 1 },
- "backup" => { "backupdir" => "=s",
- "clean" => ":-99",
- "all" => 1,
- "dry-run|n" => 1 },
- "update" => { "no-depends" => 1,
- "no-depends-at-all" => 1,
- "all" => 1,
- "self" => 1,
- "list" => 1,
- "no-auto-remove" => 1,
- "no-auto-install" => 1,
- "reinstall-forcibly-removed" => 1,
- "force" => 1,
- "backupdir" => "=s",
- "backup" => 1,
- "exclude" => "=s@",
- "dry-run|n" => 1 },
- "paper" => { "list" => 1 },
- "install" => { "no-depends" => 1,
- "no-depends-at-all" => 1,
- "reinstall" => 1,
- "force" => 1,
- "dry-run|n" => 1 },
- "arch" => { "dry-run|n" => 1 },
- "generate" => { "localcfg" => "=s",
- "dest" => "=s",
- "rebuild-sys" => 1 },
- "path" => { "w32mode" => "=s" },
- "postaction" => {"w32mode" => "=s",
- "all" => 1,
- "fileassocmode" => "=i" },
- "uninstall"=> { "force" => 1 },
- "check" => { "use-svn" => 1 },
- "recreate-tlpdb" => { "arch" => "=s" },
- "gui" => { "load" => 1 },
+ "arch" => { "dry-run|n" => 1 },
+ "backup" => { "backupdir" => "=s",
+ "clean" => ":-99",
+ "all" => 1,
+ "dry-run|n" => 1 },
+ "check" => { "use-svn" => 1 },
+ "generate" => { "localcfg" => "=s",
+ "dest" => "=s",
+ "rebuild-sys" => 1 },
+ "gui" => { "load" => 1 },
+ "install" => { "no-depends" => 1,
+ "no-depends-at-all" => 1,
+ "reinstall" => 1,
+ "force" => 1,
+ "dry-run|n" => 1 },
+ "list" => { "only-installed" => 1 },
+ "paper" => { "list" => 1 },
+ "path" => { "w32mode" => "=s" },
+ "postaction" => { "w32mode" => "=s",
+ "all" => 1,
+ "fileassocmode" => "=i" },
+ "recreate-tlpdb"=> { "arch" => "=s" },
+ "remove" => { "no-depends" => 1,
+ "no-depends-at-all" => 1,
+ "force" => 1,
+ "dry-run|n" => 1 },
+ "restore" => { "backupdir" => "=s",
+ "dry-run|n" => 1,
+ "all" => 1,
+ "force" => 1 },
+ "search" => { "global" => 1,
+ "file" => 1 },
+ "show" => { "list" => 1 },
+ "uninstall" => { "force" => 1 },
+ "update" => { "no-depends" => 1,
+ "no-depends-at-all" => 1,
+ "all" => 1,
+ "self" => 1,
+ "list" => 1,
+ "no-auto-remove" => 1,
+ "no-auto-install" => 1,
+ "reinstall-forcibly-removed" => 1,
+ "force" => 1,
+ "backupdir" => "=s",
+ "backup" => 1,
+ "exclude" => "=s@",
+ "dry-run|n" => 1 },
);
my %optarg;
@@ -216,7 +217,13 @@ sub main {
my $action = shift @ARGV;
if (!defined($action)) {
- $action = $opts{"gui"} ? "gui" : "";
+ if ($opts{"gui"}) { # -gui = gui
+ $action = "gui";
+ } elsif ($opts{"print-arch"}) { # -print-arch = print-arch
+ $action = "print-arch";
+ } else {
+ $action = "";
+ }
}
ddebug("action = $action\n");
@@ -267,7 +274,6 @@ sub main {
}
# --machine-readable is only supported by update.
- #
if ($::machinereadable &&
$action ne "update" && $action ne "install" && $action ne "option") {
tlwarn("tlmgr: --machine-readable output not supported for $action\n");