summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl41
1 files changed, 41 insertions, 0 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index ca00d7c8740..9afccb86c7c 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -2009,6 +2009,34 @@ sub action_option {
} else {
info("Option $what = ", $localtlpdb->option($what), "\n");
}
+ } elsif ($what =~ m/^autobackup$/i) {
+ my $val = shift @ARGV;
+ if (defined($val)) {
+ if ($val =~ m/-?[0-9]+/) {
+ if ($val < -1) {
+ tlwarn "Value $val for autobackup not supported, must be >= -1\n";
+ return;
+ }
+ } elsif ($val =~ m/^infty$/i) {
+ $val = -1;
+ } else {
+ tlwarn "Value $val for autobackup not supported, must be >= -1\n";
+ return;
+ }
+ info("tlmgr: setting option $what to $val");
+ $localtlpdb->option($what,$val);
+ $localtlpdb->save;
+ } else {
+ $val = $localtlpdb->option($what);
+ info("Option $what = $val");
+ }
+ if ($val == -1) {
+ info(" (make and keep infinitely many backups)\n");
+ } elsif ($val == 0) {
+ info(" (don't keep any backups)\n");
+ } else {
+ info(" (make and keep $val backups)\n");
+ }
} elsif (member($what, @AllowedConfigOptions)) {
# for all further options not handled above, we check whether they
# appear in the list of allowed options; if they do, we set/read
@@ -3146,6 +3174,19 @@ will not be removed by default. If C<autobackup> is 0 or positive, it
specifies the number of backups to be kept. Thus, backups are disabled
with 0 as the values.
+B<Warning:> If you want to set the optin C<autobackup> on the command line
+it might be interpreted as an option. In this case you have to use
+
+ tlmgr option -- autobackup -1
+
+The C<--> makes tlmgr stop parsing for options at that place.
+
+Alternatively, you can ue C<infty> instead of C<-1>, so the above is
+equivalent to
+
+ tlmgr option autobackup infty
+
+
In the C<--clean> mode of the C<backup> action this option also
specifies the number to be kept.