diff options
-rwxr-xr-x | Master/install-tl | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/Master/install-tl b/Master/install-tl index 7dadd4b68c1..5a59cba67b5 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -1322,6 +1322,10 @@ sub do_install_packages { } else { tlwarn(" install-tl --profile $profile_name [EXTRA-ARGS]\n"); } + # do not continue with installation, but terminate the program + # the option to do_cleanup indicates that the containers should + # not be removed + do_cleanup(1); } } @@ -1519,6 +1523,10 @@ sub check_on_lang_collection_installed { sub do_cleanup { + # by default we remove containers + my $remove_container = 1; + my $arg = shift; + $remove_container = 0 if (defined($arg) && $arg); # now open the log file and write out the log lines # try to open a log file # the user could have given the -logfile option in which case all the @@ -1536,10 +1544,12 @@ sub do_cleanup } } - # remove temporary files from TEXDIR/temp - if (($media eq "CD") or ($media eq "NET")) { - debug("Remove temporary downloaded containers...\n"); - rmtree("$vars{'TEXDIRW'}/temp") if (-d "$vars{'TEXDIRW'}/temp"); + if ($remove_container) { + # remove temporary files from TEXDIR/temp + if (($media eq "CD") or ($media eq "NET")) { + debug("Remove temporary downloaded containers...\n"); + rmtree("$vars{'TEXDIRW'}/temp") if (-d "$vars{'TEXDIRW'}/temp"); + } } # dump various things to the log file |