summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/texlive
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-02-10 22:57:28 +0000
committerKarl Berry <karl@freefriends.org>2021-02-10 22:57:28 +0000
commit25cbba1ac20adca3f773955b73e62dd93efdc2b7 (patch)
treeaddfdd299a81e5a456fbdb056f3ea4ab43f12bc1 /Master/texmf-dist/scripts/texlive
parent9f4f4e8bd472d2f888f63f255de6aa8e2d461da2 (diff)
(uninstall_texlive): use File::Find::finddepth
instead of GNU rmdir --ignore-fail-on-non-empty. Report from David Stes. git-svn-id: svn://tug.org/texlive/trunk@57705 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/texlive')
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/tlmgr.pl10
1 files changed, 7 insertions, 3 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl
index 7dc759544e4..44974014d29 100755
--- a/Master/texmf-dist/scripts/texlive/tlmgr.pl
+++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl
@@ -93,6 +93,7 @@ BEGIN {
}
use Cwd qw/abs_path/;
+use File::Find;
use File::Spec;
use Pod::Usage;
use Getopt::Long qw(:config no_autoabbrev permute);
@@ -5239,7 +5240,8 @@ Error message from creating MainWindow:
# UNINSTALL
-#
+# Return zero if successful, nonzero if failure.
+#
sub uninstall_texlive {
if (win32()) {
printf STDERR "Please use \"Add/Remove Programs\" from the Control Panel to removing TeX Live!\n";
@@ -5279,13 +5281,15 @@ sub uninstall_texlive {
system("rm", "-f", "$Master/$f");
}
if (-d "$Master/temp") {
- system("rmdir", "--ignore-fail-on-non-empty", "$Master/temp");
+ finddepth(sub { rmdir; }, "$Master/temp");
}
unlink("$Master/install-tl.log");
# if they want removal, give them removal. Hopefully they know how to
# regenerate any changed config files.
system("rm", "-rf", "$Master/texmf-config");
- system("rmdir", "--ignore-fail-on-non-empty", "$Master");
+ finddepth(sub { rmdir; }, "$Master");
+
+ return -d "$Master";
}