summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-04-14 17:39:45 +0000
committerNorbert Preining <preining@logic.at>2008-04-14 17:39:45 +0000
commit4940a7a3b1421dd70e95bc54de8da7403f0f6246 (patch)
tree115fb91860a46aedfd9251827c8ff61133bbf7f7 /Master/texmf
parent358678f62a9945244cecd1518a5d6dcc8767385f (diff)
add Reinhards rmtree function
git-svn-id: svn://tug.org/texlive/trunk@7409 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-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