summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-12-19 02:17:21 +0000
committerNorbert Preining <preining@logic.at>2008-12-19 02:17:21 +0000
commit7517ae808165ce92d69f54fb2e0ae6e83ca0c4b6 (patch)
tree571a823d8d57f33482127fa024d0d6f28cd71409 /Master/texmf
parent98df4d516bde4d019a085f043fe519cc3e487102 (diff)
use clean:-99 as type, so that it does not accidently takes other arguments
as values for --clean (since it searched for an integer) git-svn-id: svn://tug.org/texlive/trunk@11650 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr2.pl11
1 files changed, 6 insertions, 5 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr2.pl b/Master/texmf/scripts/texlive/tlmgr2.pl
index c98f5f4dcd2..fd99e353720 100755
--- a/Master/texmf/scripts/texlive/tlmgr2.pl
+++ b/Master/texmf/scripts/texlive/tlmgr2.pl
@@ -142,7 +142,7 @@ my %actionoptions = (
"dry-run|n" => 1,
"force" => 1 },
"backup" => { "backupdir" => "=s",
- "clean" => ":s",
+ "clean" => ":-99",
"all" => 1,
"dry-run|n" => 1 },
"update" => { "no-depends" => 1,
@@ -1007,16 +1007,17 @@ sub action_backup {
# that parallels the value of autoclean in the configuration
# we have to be careful, because if simply --clean is given, we should
# check for the value saved in the tlpdb, and if that is not present
- # do nothing. But Getopt::Long with clean:i leaves 0 in $opts{"clean"} if
- # it is present. So
+ # do nothing.
+ # We have set clean to clean:-99 which makes -99 the default value
+ # if only --clean is given without any argument
# !defined($opts{"clean"}) -> no --clean given
- # $opts{"clean"} = "" -> --clean without argument given, check tlpdb
+ # $opts{"clean"} = -99 -> --clean without argument given, check tlpdb
# $opts{"clean"} = -1, 0, N -> --clean=N given, check argument
#
my $clean_mode = 0;
$clean_mode = 1 if defined($opts{"clean"});
if ($clean_mode) {
- if ($opts{"clean"} eq "") {
+ if ($opts{"clean"} == -99) {
# we need to check the tlpdb
$opts{"clean"} = $localtlpdb->option("autobackup");
if (!$opts{"clean"}) {