summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2009-08-05 15:17:49 +0000
committerNorbert Preining <preining@logic.at>2009-08-05 15:17:49 +0000
commit272f667ff1987bad105a0f13f0337e9813671862 (patch)
treeddf08f061cd0aa0c3d5cb8bd2086b1b5e52934fc /Master/texmf
parent036676ef7916ae35aa73e59c91f81ae9272c6ef4 (diff)
merge the bunch of TLPDBOptionsXXXX and TLPDBSettingXXXX into one hash each
git-svn-id: svn://tug.org/texlive/trunk@14541 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl36
-rw-r--r--Master/texmf/scripts/texlive/tlmgrgui/gui-config.pl4
2 files changed, 20 insertions, 20 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index e138e649496..5a18cab7203 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -2113,8 +2113,8 @@ sub action_option {
if (win32()) {
next if ($o =~ m/^sys_/);
}
- if (defined $TLPDBOptionDesc{$o}) {
- info("$TLPDBOptionDesc{$o} ($TLPDBOptionTlmgrName{$o}): " .
+ if (defined $TLPDBOptions{$o}) {
+ info("$TLPDBOptions{$o}->[2] ($TLPDBOptions{$o}->[1]): " .
$localtlpdb->option($o) . "\n");
} else {
tlwarn ("option $o not supported\n");
@@ -2122,21 +2122,21 @@ sub action_option {
}
} elsif ($what =~ m/^showall$/i) {
my %loc = %{$localtlpdb->options};
- for my $o (keys %TLPDBOptionDesc) {
- info("$TLPDBOptionDesc{$o} ($TLPDBOptionTlmgrName{$o}): " .
+ for my $o (keys %TLPDBOptions) {
+ info("$TLPDBOptions{$o}->[2] ($TLPDBOptions{$o}->[1]): " .
(defined($loc{$o}) ? $loc{$o} : "(not set)") . "\n");
}
} else {
my $found = 0;
- for my $opt (keys %TLPDBOptionTlmgrName) {
- if ($what eq $TLPDBOptionTlmgrName{$opt}) {
+ for my $opt (keys %TLPDBOptions) {
+ if ($what eq $TLPDBOptions{$opt}->[1]) {
$found = 1;
# the option argument matches the name
my $val = shift @ARGV;
if (defined($val)) {
# set new value
# here we have to care for some special cases
- if ($what eq $TLPDBOptionTlmgrName{"location"}) {
+ if ($what eq $TLPDBOptions{"location"}->[1]) {
# support "ctan" on the cmd line, and don't abs_path it!
if ($val =~ m/^ctan$/i) {
$val = "$TeXLive::TLConfig::TeXLiveURL";
@@ -2151,18 +2151,18 @@ sub action_option {
}
info("tlmgr: setting default installation location to $val\n");
$localtlpdb->option($opt, $val);
- } elsif ($what eq $TLPDBOptionTlmgrName{"backupdir"}) {
+ } elsif ($what eq $TLPDBOptions{"backupdir"}->[1]) {
info("tlmgr: setting option $what to $val.\n");
if (! -d $val) {
info("tlmgr: the directory $val does not exists, it has to be created\n");
info("tlmgr: before backups can be done automatically.\n");
}
$localtlpdb->option($opt, $val);
- } elsif ($what eq $TLPDBOptionTlmgrName{"w32_multi_user"}) {
+ } elsif ($what eq $TLPDBOptions{"w32_multi_user"}->[1]) {
# when running w32 do not allow that a non-admin users sets
# this from false to true
if (win32() && !admin() && !$val) {
- tlwarn("tlmgr: non-admin user cannot set $TLPDBOptionTlmgrName{'w32_multi_user'} option to true\n");
+ tlwarn("tlmgr: non-admin user cannot set $TLPDBOptions{'w32_multi_user'}->[1] option to true\n");
} else {
if ($val) {
info("tlmgr: setting option $what to 1.\n");
@@ -2174,7 +2174,7 @@ sub action_option {
}
} else {
# default case, switch for different types
- if ($TLPDBOptionType{$opt} eq "b") {
+ if ($TLPDBOptions{$opt}->[0] eq "b") {
if ($val) {
info("tlmgr: setting option $what to 1.\n");
$localtlpdb->option($opt, 1);
@@ -2182,13 +2182,13 @@ sub action_option {
info("tlmgr: setting option $what to 0.\n");
$localtlpdb->option($opt, 0);
}
- } elsif ($TLPDBOptionType{$opt} eq "p") {
+ } elsif ($TLPDBOptions{$opt}->[0] eq "p") {
info("tlmgr: setting option $what to $val.\n");
$localtlpdb->option($opt, $val);
- } elsif ($TLPDBOptionType{$opt} eq "u") {
+ } elsif ($TLPDBOptions{$opt}->[0] eq "u") {
info("tlmgr: setting option $what to $val.\n");
$localtlpdb->option($opt, $val);
- } elsif ($TLPDBOptionType{$opt} =~ m/^n(:((-)?\d+)?..((-)?\d+)?)?$/) {
+ } elsif ($TLPDBOptions{$opt}->[0] =~ m/^n(:((-)?\d+)?..((-)?\d+)?)?$/) {
my $isgood = 1;
my $n = int($val);
my $low;
@@ -2198,14 +2198,14 @@ sub action_option {
if (defined($2)) {
# lower border
if ($2 > $n) {
- tlwarn("value $n for $what out of range ($TLPDBOptionType{$opt})\n");
+ tlwarn("value $n for $what out of range ($TLPDBOptions{$opt}->[0])\n");
$isgood = 0;
}
}
if (defined($4)) {
# upper border
if ($4 < $n) {
- tlwarn("value $n for $what out of range ($TLPDBOptionType{$opt})\n");
+ tlwarn("value $n for $what out of range ($TLPDBOptions{$opt}->[0])\n");
$isgood = 0;
}
}
@@ -2215,13 +2215,13 @@ sub action_option {
$localtlpdb->option($opt, $n);
}
} else {
- tlwarn ("Unknown type of option $opt: $TLPDBOptionType{$opt}\n");
+ tlwarn ("Unknown type of option $opt: $TLPDBOptions{$opt}->[0]\n");
}
}
$localtlpdb->save;
} else {
# show current value
- info ("$TLPDBOptionDesc{$opt} ($TLPDBOptionTlmgrName{$opt}): " .
+ info ("$TLPDBOptions{$opt}->[2] ($TLPDBOptions{$opt}->[1]): " .
$localtlpdb->option($opt) . "\n");
}
last;
diff --git a/Master/texmf/scripts/texlive/tlmgrgui/gui-config.pl b/Master/texmf/scripts/texlive/tlmgrgui/gui-config.pl
index 81a910deb28..f2bf48e0713 100644
--- a/Master/texmf/scripts/texlive/tlmgrgui/gui-config.pl
+++ b/Master/texmf/scripts/texlive/tlmgrgui/gui-config.pl
@@ -16,8 +16,8 @@ $fileassocdesc[1] = ___"fa_onlynew";
$fileassocdesc[2] = ___"fa_all";
my %defaults;
-for my $key (keys %TeXLive::TLConfig::TLPDBOptionTlmgrName) {
- if ($TeXLive::TLConfig::TLPDBOptionType{$key} eq "b") {
+for my $key (keys %TeXLive::TLConfig::TLPDBOptions) {
+ if ($TeXLive::TLConfig::TLPDBOptions{$key}->[0] eq "b") {
$defaults{$key} = ($localtlpdb->option($key) ? ___"yes" : ___"no");
} else {
if ($key eq "file_assocs") {