summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2010-06-24 01:48:19 +0000
committerNorbert Preining <preining@logic.at>2010-06-24 01:48:19 +0000
commitd9f8f20f6837fc96f91504e7ef1ac9ba08c9f1c0 (patch)
tree0c2b305b062d19e869a74028b0937ab495c34a58 /Master/texmf
parentb0bf3d164ddfab0ee32d3540521bf6ac5b91dbe7 (diff)
make "platform" the canoncial expression in tlmgr.pl, but still allow "arch"
git-svn-id: svn://tug.org/texlive/trunk@19129 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl63
1 files changed, 33 insertions, 30 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index a505c2f71bc..a5be49d541d 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -130,12 +130,12 @@ sub main {
"persistent-downloads" => "!",
"no-execute-actions" => 1,
"pause" => 1,
- "print-arch" => 1,
+ "print-platform|print-arch" => 1,
"version" => 1,
"help|h|?" => 1);
my %actionoptions = (
- "arch" => { "dry-run|n" => 1 },
+ "platform" => { "dry-run|n" => 1 },
"backup" => { "backupdir" => "=s",
"clean" => ":-99",
"all" => 1,
@@ -156,7 +156,7 @@ sub main {
"postaction" => { "w32mode" => "=s",
"all" => 1,
"fileassocmode" => "=i" },
- "recreate-tlpdb"=> { "arch" => "=s" },
+ "recreate-tlpdb"=> { "platform|arch" => "=s" },
"remove" => { "no-depends" => 1,
"no-depends-at-all" => 1,
"force" => 1,
@@ -219,13 +219,15 @@ sub main {
if (!defined($action)) {
if ($opts{"gui"}) { # -gui = gui
$action = "gui";
- } elsif ($opts{"print-arch"}) { # -print-arch = print-arch
- $action = "print-arch";
+ } elsif ($opts{"print-platform"}) { # -print-arch = print-arch
+ $action = "print-platform";
} else {
$action = "";
}
}
+ $action = "platform" if ($action eq "arch");
+
ddebug("action = $action\n");
for my $k (keys %opts) {
ddebug("$k => $opts{$k}\n");
@@ -241,7 +243,7 @@ sub main {
$opts{"help"} = 1;
}
- if (defined($action) && ($action =~ m/^print-arch$/i)) {
+ if (defined($action) && ($action =~ m/^print-platform$/i)) {
print TeXLive::TLUtils::platform(), "\n";
exit 0;
}
@@ -464,8 +466,8 @@ sub execute_action {
action_gui();
} elsif ($action =~ m/^gui$/i) {
action_gui();
- } elsif ($action =~ m/^arch$/i) {
- action_arch();
+ } elsif ($action =~ m/^platform$/i) {
+ action_platform();
} elsif ($action =~ m/^option$/i) {
action_option();
finish(0);
@@ -3054,20 +3056,20 @@ sub action_option {
# ARCH
#
-sub action_arch {
+sub action_platform {
my @extra_w32_packs = qw/tlperl.win32 tlgs.win32 tlpsv.win32
collection-wintools
dviout.win32 wintools.win32/;
if ($^O=~/^MSWin(32|64)$/i) {
- warn("action `arch' not supported on Windows\n");
+ warn("action `platform' not supported on Windows\n");
return();
}
if ($opts{"gui"}) {
- action_gui("arch");
+ action_gui("platform");
}
my $what = shift @ARGV;
init_local_db(1);
- info("arch: dry run, no changes will be made\n") if $opts{"dry-run"};
+ info("platform: dry run, no changes will be made\n") if $opts{"dry-run"};
$what || ($what = "list");
if ($what =~ m/^list$/i) {
# list the available platforms
@@ -3084,7 +3086,7 @@ sub action_arch {
}
}
print "Already installed platforms are marked with (i)\n";
- print "You can add new platforms with: tlmgr arch add ARCH1 ARCH2...\n";
+ print "You can add new platforms with: tlmgr platform add ARCH1 ARCH2...\n";
finish(0);
} elsif ($what =~ m/^add$/i) {
return if !check_on_writable();
@@ -3095,11 +3097,11 @@ sub action_arch {
my @todoarchs;
foreach my $a (@ARGV) {
if (TeXLive::TLUtils::member($a, @already_installed_arch)) {
- print "Arch $a is already installed\n";
+ print "Platform $a is already installed\n";
next;
}
if (!TeXLive::TLUtils::member($a, @available_arch)) {
- print "Arch $a not available, use 'tlmgr arch list'!\n";
+ print "Platform $a not available, use 'tlmgr platform list'!\n";
next;
}
push @todoarchs, $a;
@@ -3141,11 +3143,11 @@ sub action_arch {
my $currentarch = $localtlmedia->platform();
foreach my $a (@ARGV) {
if (!TeXLive::TLUtils::member($a, @already_installed_arch)) {
- print "Arch $a not installed, use 'tlmgr arch list'!\n";
+ print "Platform $a not installed, use 'tlmgr platform list'!\n";
next;
}
if ($currentarch eq $a) {
- info("You are running on arch $a, you cannot remove that one!\n");
+ info("You are running on platform $a, you cannot remove that one!\n");
next;
}
push @todoarchs, $a;
@@ -3193,7 +3195,7 @@ sub action_arch {
$localtlpdb->save;
}
} else {
- die "Unknown option for arch: $what";
+ die "Unknown option for platform: $what";
}
}
@@ -3468,17 +3470,17 @@ sub action_recreate_tlpdb {
# only one arch available, fine, use it as default
push @deps, "setting_platform:$archs[0]";
} else {
- if (defined($opts{"arch"})) {
- if (member($opts{"arch"}, @archs)) {
- push @deps, "setting_platform:" . $opts{"arch"};
+ if (defined($opts{"platform"})) {
+ if (member($opts{"platform"}, @archs)) {
+ push @deps, "setting_platform:" . $opts{"platform"};
} else {
- tlwarn("The platform you passed in with --arch is not present in $Master/bin\n");
+ tlwarn("The platform you passed in with --platform is not present in $Master/bin\n");
tlwarn("Please specify one of the available ones: @archs\n");
exit(1);
}
} else {
tlwarn("More than one platform available: @archs\n");
- tlwarn("Please pass one as the default you are running on with --arch=...\n");
+ tlwarn("Please pass one as the default you are running on with --platform=...\n");
exit(1);
}
}
@@ -5284,17 +5286,17 @@ settings for some programs, notably C<dvips>. C<tlmgr> does not support
those extra settings at present.
-=head2 arch list|add|remove I<arch>...
+=head2 platform list|add|remove I<arch>...
-C<arch list> lists the TeX Live names of all the platforms
+C<platform list> lists the TeX Live names of all the platforms
(a.k.a. architectures), (C<i386-linux>, ...) available at the package
repository.
-C<arch add> I<arch>... adds the executables for each given platform
-I<arch> to the installation from the repository.
+C<platform add> I<platform>... adds the executables for each given platform
+I<platform> to the installation from the repository.
-C<arch remove> I<arch>... removes the executables for each given
-platform I<arch> from the installation, but keeps the currently
+C<platform remove> I<platform>... removes the executables for each given
+platform I<platform> from the installation, but keeps the currently
running platform in any case.
Options:
@@ -5308,8 +5310,9 @@ written to the terminal.
=back
+Note: C<arch> is still accepted as synonym for C<platform>.
-=head2 print-arch
+=head2 print-platform
Print the TeX Live identifier for the detected platform
(hardware/operating system) combination to standard output, and exit.