summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.texlua15
1 files changed, 15 insertions, 0 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.texlua b/Master/texmf/scripts/texlive/tlmgr.texlua
index f5cbb5c168b..0c4441eeac2 100755
--- a/Master/texmf/scripts/texlive/tlmgr.texlua
+++ b/Master/texmf/scripts/texlive/tlmgr.texlua
@@ -57,6 +57,21 @@ function findscript(scriptname)
end
end
+# function from Reinhard, could replace rmdir, needs testing
+function rmtree (path)
+ for file in lfs.dir(path) do
+ if file ~= '.' and file ~= '..' then
+ local f = path..'/'..file
+ if lfs.isdir(f) then
+ rmtree(f)
+ print ('lfs.rmdir '..f) -- lfs.rmdir(f)
+ else
+ print ('os.remove '..f) -- os.remove(f)
+ end
+ end
+ end
+end
+
function rmdir(name)
if os.type == 'windows' then
-- code from Hans