texlive[43795] Master: start on tlmgr shell
commits+preining at tug.org
commits+preining at tug.org
Sat Apr 15 02:13:58 CEST 2017
Revision: 43795
http://tug.org/svn/texlive?view=revision&revision=43795
Author: preining
Date: 2017-04-15 02:13:58 +0200 (Sat, 15 Apr 2017)
Log Message:
-----------
start on tlmgr shell
Modified Paths:
--------------
trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl
Added Paths:
-----------
trunk/Master/tlpkg/doc/tlmgr-shell.txt
Modified: trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl
===================================================================
--- trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl 2017-04-15 00:12:54 UTC (rev 43794)
+++ trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl 2017-04-15 00:13:58 UTC (rev 43795)
@@ -389,6 +389,11 @@
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 @@
}
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__
Added: trunk/Master/tlpkg/doc/tlmgr-shell.txt
===================================================================
--- trunk/Master/tlpkg/doc/tlmgr-shell.txt (rev 0)
+++ trunk/Master/tlpkg/doc/tlmgr-shell.txt 2017-04-15 00:13:58 UTC (rev 43795)
@@ -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.
+
+
Property changes on: trunk/Master/tlpkg/doc/tlmgr-shell.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
More information about the tex-live-commits
mailing list