diff options
author | Karl Berry <karl@freefriends.org> | 2021-05-06 22:52:43 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-05-06 22:52:43 +0000 |
commit | 59caf1c81f6e051f5c7e73fd18f254c679fcc7f6 (patch) | |
tree | 51c55f74be106c5f9a77b7cef2dd57b47bd81d9b /Master | |
parent | bcc2f518e235a5f8ed4cfc1563b4cef472d2f242 (diff) |
(uninstall_texlive): mention that texmfconfig/texmfvar are not touched.
git-svn-id: svn://tug.org/texlive/trunk@59108 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-x | Master/texmf-dist/scripts/texlive/tlmgr.pl | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl index d6cc899fd70..f57d5ec348e 100755 --- a/Master/texmf-dist/scripts/texlive/tlmgr.pl +++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl @@ -5255,9 +5255,10 @@ sub uninstall_texlive { return ($F_OK | $F_NOPOSTACTION); } my $force = defined($opts{"force"}) ? $opts{"force"} : 0; + my $tlroot = $localtlpdb->root; if (!$force) { print("If you answer yes here the whole TeX Live installation here,\n", - "under ", $localtlpdb->root, ", will be removed!\n"); + "under $tlroot, will be removed!\n"); print "Remove TeX Live (y/N): "; my $yesno = <STDIN>; if (!defined($yesno) || $yesno !~ m/^y(es)?$/i) { @@ -5265,18 +5266,23 @@ sub uninstall_texlive { return ($F_OK | $F_NOPOSTACTION); } } - print ("Ok, removing the whole installation:\n"); + print ("Ok, removing the whole TL installation under: $tlroot\n"); + + print ("symlinks... "); TeXLive::TLUtils::remove_symlinks($localtlpdb->root, $localtlpdb->platform(), $localtlpdb->option("sys_bin"), $localtlpdb->option("sys_man"), $localtlpdb->option("sys_info")); # now remove the rest + print ("main dirs... "); system("rm", "-rf", "$Master/texmf-dist"); system("rm", "-rf", "$Master/texmf-doc"); system("rm", "-rf", "$Master/texmf-var"); system("rm", "-rf", "$Master/tlpkg"); system("rm", "-rf", "$Master/bin"); + + print ("misc... "); system("rm", "-rf", "$Master/readme-html.dir"); system("rm", "-rf", "$Master/readme-txt.dir"); for my $f (qw/doc.html index.html install-tl @@ -5291,9 +5297,28 @@ sub uninstall_texlive { # if they want removal, give them removal. Hopefully they know how to # regenerate any changed config files. system("rm", "-rf", "$Master/texmf-config"); + # finddepth(sub { rmdir; }, "$Master"); - return -d "$Master"; + # but not user dirs. + chomp (my $texmfconfig = `kpsewhich -var-value=TEXMFCONFIG`); + chomp (my $texmfvar = `kpsewhich -var-value=TEXMFVAR`); + print <<NOT_REMOVED; + +User directories intentionally not touched, removing them is up to you: + TEXMFCONFIG=$texmfconfig + TEXMFVAR=$texmfvar + +NOT_REMOVED + + my $remnants; + if (-d $Master) { + print "\nSorry, something did not get removed, under: $Master\n"; + $remnants = 1; + } else { + $remnants = 0; + } + return $remnants; } |