diff options
author | Norbert Preining <preining@logic.at> | 2017-05-02 21:11:59 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2017-05-02 21:11:59 +0000 |
commit | 81f07c7a915e291b32a374633d29f64be74c1c88 (patch) | |
tree | 64815649595e4847a9833918efb375c5d6432418 /Master/texmf-dist | |
parent | 1a459d6e94e2366540e466c552499f484f0546dc (diff) |
suggestions from Karl for tlmgr shell
git-svn-id: svn://tug.org/texlive/trunk@44153 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rwxr-xr-x | Master/texmf-dist/scripts/texlive/tlmgr.pl | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl index 7343a91fb61..95f7fe2cfc5 100755 --- a/Master/texmf-dist/scripts/texlive/tlmgr.pl +++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl @@ -5908,7 +5908,10 @@ sub action_shell { my $dest = shift @args; print "ERROR not implemented: $cmd\n"; } elsif ($cmd =~ m/^(set|get)$/) { - my @valid_keys = qw/repository debug-translation machine-readable no-execute-actions require-verification verify-downloads/; + my @valid_bool_keys = qw/debug-translation machine-readable no-execute-actions require-verification verify-downloads/; + my @valid_string_keys = qw/repository/; + my @valid_keys = @valid_bool_keys; + push @valid_keys, @valid_string_keys; my $key = shift @args; my $val = shift @args; if (!$key) { @@ -5946,9 +5949,16 @@ sub action_shell { } } print "OK\n"; - } elsif ($key =~ m/^(debug-translation|machine-readable|no-execute-actions|require-verification|verify-downloads)$/) { + } elsif (TeXLive::TLUtils::member($key, @valid_bool_keys)) { if ($cmd eq "set") { - $opts{$key} = ($val eq "1" ? 1 : 0); + if ($val eq "0") { + $opts{$key} = 0; + } elsif ($val eq "1") { + $opts{$key} = 1; + } else { + print "ERROR invalid value $val for key $key\n"; + next; + } # special cases $::debug_translation = $opts{"debug-translation"}; $::machinereadable = $opts{"machine-readable"}; |