diff options
author | Norbert Preining <preining@logic.at> | 2017-04-15 00:13:58 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2017-04-15 00:13:58 +0000 |
commit | 8b451263c704aa050c23c14af8e204f560fe4be5 (patch) | |
tree | 85bf79277234623f61072750e69fcdccfa870711 /Master/texmf-dist/scripts | |
parent | 92beda79f15a01c5c027fa3e31bcefafe910e905 (diff) |
start on tlmgr shell
git-svn-id: svn://tug.org/texlive/trunk@43795 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts')
-rwxr-xr-x | Master/texmf-dist/scripts/texlive/tlmgr.pl | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl index 1117e5e94e1..9e0d5601525 100755 --- a/Master/texmf-dist/scripts/texlive/tlmgr.pl +++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl @@ -389,6 +389,11 @@ sub main { TeXLive::TLUtils::process_logging_options(); + my $shellcheck = $ARGV[0]; + if (defined($shellcheck) && $shellcheck eq "shell") { + exit(start_shell()); + } + GetOptions(\%opts, keys(%optarg)) or pod2usage(2); $::debug_translation = 0; @@ -6495,7 +6500,34 @@ sub check_on_writable { } return 1; } - + + +########### +# tlmgr shell code +sub start_shell { + my $protocol = 1; + my $prompt = "tlmgr> "; + + print "protocol $protocol\n"; + while (1) { + print $prompt; + my $ans = <STDIN>; + chomp $ans; + my ($cmd, @args) = split(' ', $ans); + next if (!$cmd); + if ($cmd eq "protocol") { + print "protocol $protocol\n"; + } elsif ($cmd eq "version") { + print give_version(), "\n"; + } elsif ($cmd =~ m/^(quit|end|byebye)$/i) { + return 0; + } else { + print "not implemented by now\n"; + } + } +} + + 1; __END__ |