summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xMaster/tlpkg/bin/uninstall-tl.pl8
1 files changed, 7 insertions, 1 deletions
diff --git a/Master/tlpkg/bin/uninstall-tl.pl b/Master/tlpkg/bin/uninstall-tl.pl
index fbb23296058..de443cc76ae 100755
--- a/Master/tlpkg/bin/uninstall-tl.pl
+++ b/Master/tlpkg/bin/uninstall-tl.pl
@@ -29,6 +29,11 @@ use strict;
&main ();
+sub win32
+{
+ return ($^O=~/^MSWin(32|64)$/i ? 1 : 0);
+}
+
sub main
{
# get the db.
@@ -62,7 +67,8 @@ sub main
system("rm -rf \"$Master/tlpkg\"");
system("rm -f \"$Master/install-tl.log\"");
# now everything should be removed ...
- system("rmdir \"$Master\"") or
+ # note that shell returns 0 on success, so we have to use "and"
+ system("rmdir \"$Master\"") and
warn("Couldn't completely remove $Master: $!\n");
}
}