summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2017-04-15 00:13:58 +0000
committerNorbert Preining <preining@logic.at>2017-04-15 00:13:58 +0000
commit8b451263c704aa050c23c14af8e204f560fe4be5 (patch)
tree85bf79277234623f61072750e69fcdccfa870711 /Master
parent92beda79f15a01c5c027fa3e31bcefafe910e905 (diff)
start on tlmgr shell
git-svn-id: svn://tug.org/texlive/trunk@43795 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/tlmgr.pl34
-rw-r--r--Master/tlpkg/doc/tlmgr-shell.txt48
2 files changed, 81 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__
diff --git a/Master/tlpkg/doc/tlmgr-shell.txt b/Master/tlpkg/doc/tlmgr-shell.txt
new file mode 100644
index 00000000000..93384a53f4a
--- /dev/null
+++ b/Master/tlpkg/doc/tlmgr-shell.txt
@@ -0,0 +1,48 @@
+TeX Live Manager Shell
+======================
+
+to be written
+
+after starting, tlmgr shell echos out the protocol version
+ $ tlmgr shell
+ protocol NNN
+where NNN is a natural number, increasing when some commands
+are added, changed.
+
+Question:
+Handling of settings: e.g., how to mimic --repository and how
+to distinguish it from settings to be saved into the tlpdb.
+(--repository is used only for one incantation, but not saved
+into tlpdb)
+
+Commands:
+---------
+* set
+ sets some variables not to be saved into the tlpdb
+ set repository ... == --repository
+ set gui-lang LL == --gui-lang
+ set debug-translation 1 == --debug-translations
+ set machine-readable 1 == --machine-readable
+ set no-execute-actions 1 == --no-execute-actions
+ set package-logfile .. == --package-logfile
+ set persistent-downloads 0|1 == --(no-)persistent-downloads
+ set pin-file ... == --pin-file
+ set require-verification 0|1 == --(no-)require-verification
+ set usermode 1 == --usermode
+ set verify-downloads 0|1 == --(no-)verify-downloads
+
+* quit|end|byebye
+ ends the session
+
+* load local|remote
+ loads the local or remote database
+ the remote tlpdb is determined by either the setting in the
+ loaded local tlpdb, or by the "repository" setting (see above)
+
+* save
+ saves the local tlpdb (this is also done by several actions)
+
+All other actions are converted to commands and behave in the
+absolut same way.
+
+