summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xMaster/bin/alpha-linux/tlmgr25
-rwxr-xr-xMaster/bin/hppa-hpux/tlmgr25
-rwxr-xr-xMaster/bin/i386-darwin/tlmgr25
-rwxr-xr-xMaster/bin/i386-freebsd/tlmgr25
-rwxr-xr-xMaster/bin/i386-linux/tlmgr7
-rwxr-xr-xMaster/bin/i386-openbsd/tlmgr25
-rwxr-xr-xMaster/bin/i386-solaris/tlmgr25
-rwxr-xr-xMaster/bin/mips-irix/tlmgr25
-rwxr-xr-xMaster/bin/powerpc-aix/tlmgr25
-rwxr-xr-xMaster/bin/powerpc-darwin/tlmgr25
-rwxr-xr-xMaster/bin/powerpc-linux/tlmgr25
-rwxr-xr-xMaster/bin/sparc-linux/tlmgr25
-rwxr-xr-xMaster/bin/sparc-solaris/tlmgr25
-rwxr-xr-xMaster/bin/win32/tlmgr.texlua7
-rwxr-xr-xMaster/bin/x86_64-linux/tlmgr25
15 files changed, 179 insertions, 160 deletions
diff --git a/Master/bin/alpha-linux/tlmgr b/Master/bin/alpha-linux/tlmgr
index ac31a2e677c..07784e9405a 100755
--- a/Master/bin/alpha-linux/tlmgr
+++ b/Master/bin/alpha-linux/tlmgr
@@ -1,6 +1,6 @@
#! /usr/bin/env texlua
--*-Lua-*-
--- $Id: tlmgr.texlua 7030 2008-03-19 21:52:43Z reinhardk $
+-- $Id: tlmgr 7297 2008-04-03 16:32:24Z preining $
-- Copyright (C) 2008 Reinhard Kotucha, Norbert Preining.
-- You may freely use, modify and/or distribute this file.
@@ -47,7 +47,7 @@ function setupperl()
end
function findscript(scriptname)
- script = kpse.find_file(scriptname, 'texmfscripts')
+ local script = kpse.find_file(scriptname, 'texmfscripts')
if script then
return script
else
@@ -56,20 +56,18 @@ function findscript(scriptname)
end
end
-function rmdir(dirn)
+function rmdir(name)
if os.type == 'windows' then
- -- we have to replace all / with \
- foo = string.gsub(dirn, '/', '\\')
- ret = os.spawn({"rmdir", "/s", "/q", foo})
+ -- code from Hans
+ os.execute("rmdir /s /q " .. name:gsub('/', '\\'))
else
- ret = os.spawn({"rm", "-rf", dirn})
+ ret = os.spawn({"rm", "-rf", name})
end
- if ret then
- return ret
- else
- io.stderr:write(filename..': removing '..dirn.." didn't work\n")
+ local ok = lfs.attributes(name)
+ if ok then
+ io.stderr:write(string.format("%s: removing '%s' didn't succeed\n",filename,name))
end
- return ret
+ return ok
end
if string.find(arg[0], '/') then -- UNIX path
@@ -130,9 +128,12 @@ if arg[1] == 'uninstall' then
rmdir(TEXDIR.."/texmf-config")
rmdir(TEXDIR.."/texmf")
rmdir(TEXDIR.."/tlpkg")
+ os.remove(TEXDIR.."/temp")
os.remove(TEXDIR.."/install-tl.log")
rmdir(TEXDIR.."/bin")
-- now everything should be removed, try to remove also TEXDIR
+ -- this will not succeed on win32 since texlua.exe is still in use
+ -- and thus removing TEXDIR/bin will not work. Damned.
os.remove(TEXDIR)
os.exit(0)
end
diff --git a/Master/bin/hppa-hpux/tlmgr b/Master/bin/hppa-hpux/tlmgr
index ac31a2e677c..07784e9405a 100755
--- a/Master/bin/hppa-hpux/tlmgr
+++ b/Master/bin/hppa-hpux/tlmgr
@@ -1,6 +1,6 @@
#! /usr/bin/env texlua
--*-Lua-*-
--- $Id: tlmgr.texlua 7030 2008-03-19 21:52:43Z reinhardk $
+-- $Id: tlmgr 7297 2008-04-03 16:32:24Z preining $
-- Copyright (C) 2008 Reinhard Kotucha, Norbert Preining.
-- You may freely use, modify and/or distribute this file.
@@ -47,7 +47,7 @@ function setupperl()
end
function findscript(scriptname)
- script = kpse.find_file(scriptname, 'texmfscripts')
+ local script = kpse.find_file(scriptname, 'texmfscripts')
if script then
return script
else
@@ -56,20 +56,18 @@ function findscript(scriptname)
end
end
-function rmdir(dirn)
+function rmdir(name)
if os.type == 'windows' then
- -- we have to replace all / with \
- foo = string.gsub(dirn, '/', '\\')
- ret = os.spawn({"rmdir", "/s", "/q", foo})
+ -- code from Hans
+ os.execute("rmdir /s /q " .. name:gsub('/', '\\'))
else
- ret = os.spawn({"rm", "-rf", dirn})
+ ret = os.spawn({"rm", "-rf", name})
end
- if ret then
- return ret
- else
- io.stderr:write(filename..': removing '..dirn.." didn't work\n")
+ local ok = lfs.attributes(name)
+ if ok then
+ io.stderr:write(string.format("%s: removing '%s' didn't succeed\n",filename,name))
end
- return ret
+ return ok
end
if string.find(arg[0], '/') then -- UNIX path
@@ -130,9 +128,12 @@ if arg[1] == 'uninstall' then
rmdir(TEXDIR.."/texmf-config")
rmdir(TEXDIR.."/texmf")
rmdir(TEXDIR.."/tlpkg")
+ os.remove(TEXDIR.."/temp")
os.remove(TEXDIR.."/install-tl.log")
rmdir(TEXDIR.."/bin")
-- now everything should be removed, try to remove also TEXDIR
+ -- this will not succeed on win32 since texlua.exe is still in use
+ -- and thus removing TEXDIR/bin will not work. Damned.
os.remove(TEXDIR)
os.exit(0)
end
diff --git a/Master/bin/i386-darwin/tlmgr b/Master/bin/i386-darwin/tlmgr
index ac31a2e677c..07784e9405a 100755
--- a/Master/bin/i386-darwin/tlmgr
+++ b/Master/bin/i386-darwin/tlmgr
@@ -1,6 +1,6 @@
#! /usr/bin/env texlua
--*-Lua-*-
--- $Id: tlmgr.texlua 7030 2008-03-19 21:52:43Z reinhardk $
+-- $Id: tlmgr 7297 2008-04-03 16:32:24Z preining $
-- Copyright (C) 2008 Reinhard Kotucha, Norbert Preining.
-- You may freely use, modify and/or distribute this file.
@@ -47,7 +47,7 @@ function setupperl()
end
function findscript(scriptname)
- script = kpse.find_file(scriptname, 'texmfscripts')
+ local script = kpse.find_file(scriptname, 'texmfscripts')
if script then
return script
else
@@ -56,20 +56,18 @@ function findscript(scriptname)
end
end
-function rmdir(dirn)
+function rmdir(name)
if os.type == 'windows' then
- -- we have to replace all / with \
- foo = string.gsub(dirn, '/', '\\')
- ret = os.spawn({"rmdir", "/s", "/q", foo})
+ -- code from Hans
+ os.execute("rmdir /s /q " .. name:gsub('/', '\\'))
else
- ret = os.spawn({"rm", "-rf", dirn})
+ ret = os.spawn({"rm", "-rf", name})
end
- if ret then
- return ret
- else
- io.stderr:write(filename..': removing '..dirn.." didn't work\n")
+ local ok = lfs.attributes(name)
+ if ok then
+ io.stderr:write(string.format("%s: removing '%s' didn't succeed\n",filename,name))
end
- return ret
+ return ok
end
if string.find(arg[0], '/') then -- UNIX path
@@ -130,9 +128,12 @@ if arg[1] == 'uninstall' then
rmdir(TEXDIR.."/texmf-config")
rmdir(TEXDIR.."/texmf")
rmdir(TEXDIR.."/tlpkg")
+ os.remove(TEXDIR.."/temp")
os.remove(TEXDIR.."/install-tl.log")
rmdir(TEXDIR.."/bin")
-- now everything should be removed, try to remove also TEXDIR
+ -- this will not succeed on win32 since texlua.exe is still in use
+ -- and thus removing TEXDIR/bin will not work. Damned.
os.remove(TEXDIR)
os.exit(0)
end
diff --git a/Master/bin/i386-freebsd/tlmgr b/Master/bin/i386-freebsd/tlmgr
index ac31a2e677c..07784e9405a 100755
--- a/Master/bin/i386-freebsd/tlmgr
+++ b/Master/bin/i386-freebsd/tlmgr
@@ -1,6 +1,6 @@
#! /usr/bin/env texlua
--*-Lua-*-
--- $Id: tlmgr.texlua 7030 2008-03-19 21:52:43Z reinhardk $
+-- $Id: tlmgr 7297 2008-04-03 16:32:24Z preining $
-- Copyright (C) 2008 Reinhard Kotucha, Norbert Preining.
-- You may freely use, modify and/or distribute this file.
@@ -47,7 +47,7 @@ function setupperl()
end
function findscript(scriptname)
- script = kpse.find_file(scriptname, 'texmfscripts')
+ local script = kpse.find_file(scriptname, 'texmfscripts')
if script then
return script
else
@@ -56,20 +56,18 @@ function findscript(scriptname)
end
end
-function rmdir(dirn)
+function rmdir(name)
if os.type == 'windows' then
- -- we have to replace all / with \
- foo = string.gsub(dirn, '/', '\\')
- ret = os.spawn({"rmdir", "/s", "/q", foo})
+ -- code from Hans
+ os.execute("rmdir /s /q " .. name:gsub('/', '\\'))
else
- ret = os.spawn({"rm", "-rf", dirn})
+ ret = os.spawn({"rm", "-rf", name})
end
- if ret then
- return ret
- else
- io.stderr:write(filename..': removing '..dirn.." didn't work\n")
+ local ok = lfs.attributes(name)
+ if ok then
+ io.stderr:write(string.format("%s: removing '%s' didn't succeed\n",filename,name))
end
- return ret
+ return ok
end
if string.find(arg[0], '/') then -- UNIX path
@@ -130,9 +128,12 @@ if arg[1] == 'uninstall' then
rmdir(TEXDIR.."/texmf-config")
rmdir(TEXDIR.."/texmf")
rmdir(TEXDIR.."/tlpkg")
+ os.remove(TEXDIR.."/temp")
os.remove(TEXDIR.."/install-tl.log")
rmdir(TEXDIR.."/bin")
-- now everything should be removed, try to remove also TEXDIR
+ -- this will not succeed on win32 since texlua.exe is still in use
+ -- and thus removing TEXDIR/bin will not work. Damned.
os.remove(TEXDIR)
os.exit(0)
end
diff --git a/Master/bin/i386-linux/tlmgr b/Master/bin/i386-linux/tlmgr
index 0543d040776..07784e9405a 100755
--- a/Master/bin/i386-linux/tlmgr
+++ b/Master/bin/i386-linux/tlmgr
@@ -1,6 +1,6 @@
#! /usr/bin/env texlua
--*-Lua-*-
--- $Id: tlmgr.texlua 7030 2008-03-19 21:52:43Z reinhardk $
+-- $Id: tlmgr 7297 2008-04-03 16:32:24Z preining $
-- Copyright (C) 2008 Reinhard Kotucha, Norbert Preining.
-- You may freely use, modify and/or distribute this file.
@@ -65,7 +65,7 @@ function rmdir(name)
end
local ok = lfs.attributes(name)
if ok then
- io.stderr:write(string.format("%s: removing '%s' didn't succeed\n",filename,name)
+ io.stderr:write(string.format("%s: removing '%s' didn't succeed\n",filename,name))
end
return ok
end
@@ -128,9 +128,12 @@ if arg[1] == 'uninstall' then
rmdir(TEXDIR.."/texmf-config")
rmdir(TEXDIR.."/texmf")
rmdir(TEXDIR.."/tlpkg")
+ os.remove(TEXDIR.."/temp")
os.remove(TEXDIR.."/install-tl.log")
rmdir(TEXDIR.."/bin")
-- now everything should be removed, try to remove also TEXDIR
+ -- this will not succeed on win32 since texlua.exe is still in use
+ -- and thus removing TEXDIR/bin will not work. Damned.
os.remove(TEXDIR)
os.exit(0)
end
diff --git a/Master/bin/i386-openbsd/tlmgr b/Master/bin/i386-openbsd/tlmgr
index ac31a2e677c..07784e9405a 100755
--- a/Master/bin/i386-openbsd/tlmgr
+++ b/Master/bin/i386-openbsd/tlmgr
@@ -1,6 +1,6 @@
#! /usr/bin/env texlua
--*-Lua-*-
--- $Id: tlmgr.texlua 7030 2008-03-19 21:52:43Z reinhardk $
+-- $Id: tlmgr 7297 2008-04-03 16:32:24Z preining $
-- Copyright (C) 2008 Reinhard Kotucha, Norbert Preining.
-- You may freely use, modify and/or distribute this file.
@@ -47,7 +47,7 @@ function setupperl()
end
function findscript(scriptname)
- script = kpse.find_file(scriptname, 'texmfscripts')
+ local script = kpse.find_file(scriptname, 'texmfscripts')
if script then
return script
else
@@ -56,20 +56,18 @@ function findscript(scriptname)
end
end
-function rmdir(dirn)
+function rmdir(name)
if os.type == 'windows' then
- -- we have to replace all / with \
- foo = string.gsub(dirn, '/', '\\')
- ret = os.spawn({"rmdir", "/s", "/q", foo})
+ -- code from Hans
+ os.execute("rmdir /s /q " .. name:gsub('/', '\\'))
else
- ret = os.spawn({"rm", "-rf", dirn})
+ ret = os.spawn({"rm", "-rf", name})
end
- if ret then
- return ret
- else
- io.stderr:write(filename..': removing '..dirn.." didn't work\n")
+ local ok = lfs.attributes(name)
+ if ok then
+ io.stderr:write(string.format("%s: removing '%s' didn't succeed\n",filename,name))
end
- return ret
+ return ok
end
if string.find(arg[0], '/') then -- UNIX path
@@ -130,9 +128,12 @@ if arg[1] == 'uninstall' then
rmdir(TEXDIR.."/texmf-config")
rmdir(TEXDIR.."/texmf")
rmdir(TEXDIR.."/tlpkg")
+ os.remove(TEXDIR.."/temp")
os.remove(TEXDIR.."/install-tl.log")
rmdir(TEXDIR.."/bin")
-- now everything should be removed, try to remove also TEXDIR
+ -- this will not succeed on win32 since texlua.exe is still in use
+ -- and thus removing TEXDIR/bin will not work. Damned.
os.remove(TEXDIR)
os.exit(0)
end
diff --git a/Master/bin/i386-solaris/tlmgr b/Master/bin/i386-solaris/tlmgr
index ac31a2e677c..07784e9405a 100755
--- a/Master/bin/i386-solaris/tlmgr
+++ b/Master/bin/i386-solaris/tlmgr
@@ -1,6 +1,6 @@
#! /usr/bin/env texlua
--*-Lua-*-
--- $Id: tlmgr.texlua 7030 2008-03-19 21:52:43Z reinhardk $
+-- $Id: tlmgr 7297 2008-04-03 16:32:24Z preining $
-- Copyright (C) 2008 Reinhard Kotucha, Norbert Preining.
-- You may freely use, modify and/or distribute this file.
@@ -47,7 +47,7 @@ function setupperl()
end
function findscript(scriptname)
- script = kpse.find_file(scriptname, 'texmfscripts')
+ local script = kpse.find_file(scriptname, 'texmfscripts')
if script then
return script
else
@@ -56,20 +56,18 @@ function findscript(scriptname)
end
end
-function rmdir(dirn)
+function rmdir(name)
if os.type == 'windows' then
- -- we have to replace all / with \
- foo = string.gsub(dirn, '/', '\\')
- ret = os.spawn({"rmdir", "/s", "/q", foo})
+ -- code from Hans
+ os.execute("rmdir /s /q " .. name:gsub('/', '\\'))
else
- ret = os.spawn({"rm", "-rf", dirn})
+ ret = os.spawn({"rm", "-rf", name})
end
- if ret then
- return ret
- else
- io.stderr:write(filename..': removing '..dirn.." didn't work\n")
+ local ok = lfs.attributes(name)
+ if ok then
+ io.stderr:write(string.format("%s: removing '%s' didn't succeed\n",filename,name))
end
- return ret
+ return ok
end
if string.find(arg[0], '/') then -- UNIX path
@@ -130,9 +128,12 @@ if arg[1] == 'uninstall' then
rmdir(TEXDIR.."/texmf-config")
rmdir(TEXDIR.."/texmf")
rmdir(TEXDIR.."/tlpkg")
+ os.remove(TEXDIR.."/temp")
os.remove(TEXDIR.."/install-tl.log")
rmdir(TEXDIR.."/bin")
-- now everything should be removed, try to remove also TEXDIR
+ -- this will not succeed on win32 since texlua.exe is still in use
+ -- and thus removing TEXDIR/bin will not work. Damned.
os.remove(TEXDIR)
os.exit(0)
end
diff --git a/Master/bin/mips-irix/tlmgr b/Master/bin/mips-irix/tlmgr
index ac31a2e677c..07784e9405a 100755
--- a/Master/bin/mips-irix/tlmgr
+++ b/Master/bin/mips-irix/tlmgr
@@ -1,6 +1,6 @@
#! /usr/bin/env texlua
--*-Lua-*-
--- $Id: tlmgr.texlua 7030 2008-03-19 21:52:43Z reinhardk $
+-- $Id: tlmgr 7297 2008-04-03 16:32:24Z preining $
-- Copyright (C) 2008 Reinhard Kotucha, Norbert Preining.
-- You may freely use, modify and/or distribute this file.
@@ -47,7 +47,7 @@ function setupperl()
end
function findscript(scriptname)
- script = kpse.find_file(scriptname, 'texmfscripts')
+ local script = kpse.find_file(scriptname, 'texmfscripts')
if script then
return script
else
@@ -56,20 +56,18 @@ function findscript(scriptname)
end
end
-function rmdir(dirn)
+function rmdir(name)
if os.type == 'windows' then
- -- we have to replace all / with \
- foo = string.gsub(dirn, '/', '\\')
- ret = os.spawn({"rmdir", "/s", "/q", foo})
+ -- code from Hans
+ os.execute("rmdir /s /q " .. name:gsub('/', '\\'))
else
- ret = os.spawn({"rm", "-rf", dirn})
+ ret = os.spawn({"rm", "-rf", name})
end
- if ret then
- return ret
- else
- io.stderr:write(filename..': removing '..dirn.." didn't work\n")
+ local ok = lfs.attributes(name)
+ if ok then
+ io.stderr:write(string.format("%s: removing '%s' didn't succeed\n",filename,name))
end
- return ret
+ return ok
end
if string.find(arg[0], '/') then -- UNIX path
@@ -130,9 +128,12 @@ if arg[1] == 'uninstall' then
rmdir(TEXDIR.."/texmf-config")
rmdir(TEXDIR.."/texmf")
rmdir(TEXDIR.."/tlpkg")
+ os.remove(TEXDIR.."/temp")
os.remove(TEXDIR.."/install-tl.log")
rmdir(TEXDIR.."/bin")
-- now everything should be removed, try to remove also TEXDIR
+ -- this will not succeed on win32 since texlua.exe is still in use
+ -- and thus removing TEXDIR/bin will not work. Damned.
os.remove(TEXDIR)
os.exit(0)
end
diff --git a/Master/bin/powerpc-aix/tlmgr b/Master/bin/powerpc-aix/tlmgr
index ac31a2e677c..07784e9405a 100755
--- a/Master/bin/powerpc-aix/tlmgr
+++ b/Master/bin/powerpc-aix/tlmgr
@@ -1,6 +1,6 @@
#! /usr/bin/env texlua
--*-Lua-*-
--- $Id: tlmgr.texlua 7030 2008-03-19 21:52:43Z reinhardk $
+-- $Id: tlmgr 7297 2008-04-03 16:32:24Z preining $
-- Copyright (C) 2008 Reinhard Kotucha, Norbert Preining.
-- You may freely use, modify and/or distribute this file.
@@ -47,7 +47,7 @@ function setupperl()
end
function findscript(scriptname)
- script = kpse.find_file(scriptname, 'texmfscripts')
+ local script = kpse.find_file(scriptname, 'texmfscripts')
if script then
return script
else
@@ -56,20 +56,18 @@ function findscript(scriptname)
end
end
-function rmdir(dirn)
+function rmdir(name)
if os.type == 'windows' then
- -- we have to replace all / with \
- foo = string.gsub(dirn, '/', '\\')
- ret = os.spawn({"rmdir", "/s", "/q", foo})
+ -- code from Hans
+ os.execute("rmdir /s /q " .. name:gsub('/', '\\'))
else
- ret = os.spawn({"rm", "-rf", dirn})
+ ret = os.spawn({"rm", "-rf", name})
end
- if ret then
- return ret
- else
- io.stderr:write(filename..': removing '..dirn.." didn't work\n")
+ local ok = lfs.attributes(name)
+ if ok then
+ io.stderr:write(string.format("%s: removing '%s' didn't succeed\n",filename,name))
end
- return ret
+ return ok
end
if string.find(arg[0], '/') then -- UNIX path
@@ -130,9 +128,12 @@ if arg[1] == 'uninstall' then
rmdir(TEXDIR.."/texmf-config")
rmdir(TEXDIR.."/texmf")
rmdir(TEXDIR.."/tlpkg")
+ os.remove(TEXDIR.."/temp")
os.remove(TEXDIR.."/install-tl.log")
rmdir(TEXDIR.."/bin")
-- now everything should be removed, try to remove also TEXDIR
+ -- this will not succeed on win32 since texlua.exe is still in use
+ -- and thus removing TEXDIR/bin will not work. Damned.
os.remove(TEXDIR)
os.exit(0)
end
diff --git a/Master/bin/powerpc-darwin/tlmgr b/Master/bin/powerpc-darwin/tlmgr
index ac31a2e677c..07784e9405a 100755
--- a/Master/bin/powerpc-darwin/tlmgr
+++ b/Master/bin/powerpc-darwin/tlmgr
@@ -1,6 +1,6 @@
#! /usr/bin/env texlua
--*-Lua-*-
--- $Id: tlmgr.texlua 7030 2008-03-19 21:52:43Z reinhardk $
+-- $Id: tlmgr 7297 2008-04-03 16:32:24Z preining $
-- Copyright (C) 2008 Reinhard Kotucha, Norbert Preining.
-- You may freely use, modify and/or distribute this file.
@@ -47,7 +47,7 @@ function setupperl()
end
function findscript(scriptname)
- script = kpse.find_file(scriptname, 'texmfscripts')
+ local script = kpse.find_file(scriptname, 'texmfscripts')
if script then
return script
else
@@ -56,20 +56,18 @@ function findscript(scriptname)
end
end
-function rmdir(dirn)
+function rmdir(name)
if os.type == 'windows' then
- -- we have to replace all / with \
- foo = string.gsub(dirn, '/', '\\')
- ret = os.spawn({"rmdir", "/s", "/q", foo})
+ -- code from Hans
+ os.execute("rmdir /s /q " .. name:gsub('/', '\\'))
else
- ret = os.spawn({"rm", "-rf", dirn})
+ ret = os.spawn({"rm", "-rf", name})
end
- if ret then
- return ret
- else
- io.stderr:write(filename..': removing '..dirn.." didn't work\n")
+ local ok = lfs.attributes(name)
+ if ok then
+ io.stderr:write(string.format("%s: removing '%s' didn't succeed\n",filename,name))
end
- return ret
+ return ok
end
if string.find(arg[0], '/') then -- UNIX path
@@ -130,9 +128,12 @@ if arg[1] == 'uninstall' then
rmdir(TEXDIR.."/texmf-config")
rmdir(TEXDIR.."/texmf")
rmdir(TEXDIR.."/tlpkg")
+ os.remove(TEXDIR.."/temp")
os.remove(TEXDIR.."/install-tl.log")
rmdir(TEXDIR.."/bin")
-- now everything should be removed, try to remove also TEXDIR
+ -- this will not succeed on win32 since texlua.exe is still in use
+ -- and thus removing TEXDIR/bin will not work. Damned.
os.remove(TEXDIR)
os.exit(0)
end
diff --git a/Master/bin/powerpc-linux/tlmgr b/Master/bin/powerpc-linux/tlmgr
index ac31a2e677c..07784e9405a 100755
--- a/Master/bin/powerpc-linux/tlmgr
+++ b/Master/bin/powerpc-linux/tlmgr
@@ -1,6 +1,6 @@
#! /usr/bin/env texlua
--*-Lua-*-
--- $Id: tlmgr.texlua 7030 2008-03-19 21:52:43Z reinhardk $
+-- $Id: tlmgr 7297 2008-04-03 16:32:24Z preining $
-- Copyright (C) 2008 Reinhard Kotucha, Norbert Preining.
-- You may freely use, modify and/or distribute this file.
@@ -47,7 +47,7 @@ function setupperl()
end
function findscript(scriptname)
- script = kpse.find_file(scriptname, 'texmfscripts')
+ local script = kpse.find_file(scriptname, 'texmfscripts')
if script then
return script
else
@@ -56,20 +56,18 @@ function findscript(scriptname)
end
end
-function rmdir(dirn)
+function rmdir(name)
if os.type == 'windows' then
- -- we have to replace all / with \
- foo = string.gsub(dirn, '/', '\\')
- ret = os.spawn({"rmdir", "/s", "/q", foo})
+ -- code from Hans
+ os.execute("rmdir /s /q " .. name:gsub('/', '\\'))
else
- ret = os.spawn({"rm", "-rf", dirn})
+ ret = os.spawn({"rm", "-rf", name})
end
- if ret then
- return ret
- else
- io.stderr:write(filename..': removing '..dirn.." didn't work\n")
+ local ok = lfs.attributes(name)
+ if ok then
+ io.stderr:write(string.format("%s: removing '%s' didn't succeed\n",filename,name))
end
- return ret
+ return ok
end
if string.find(arg[0], '/') then -- UNIX path
@@ -130,9 +128,12 @@ if arg[1] == 'uninstall' then
rmdir(TEXDIR.."/texmf-config")
rmdir(TEXDIR.."/texmf")
rmdir(TEXDIR.."/tlpkg")
+ os.remove(TEXDIR.."/temp")
os.remove(TEXDIR.."/install-tl.log")
rmdir(TEXDIR.."/bin")
-- now everything should be removed, try to remove also TEXDIR
+ -- this will not succeed on win32 since texlua.exe is still in use
+ -- and thus removing TEXDIR/bin will not work. Damned.
os.remove(TEXDIR)
os.exit(0)
end
diff --git a/Master/bin/sparc-linux/tlmgr b/Master/bin/sparc-linux/tlmgr
index ac31a2e677c..07784e9405a 100755
--- a/Master/bin/sparc-linux/tlmgr
+++ b/Master/bin/sparc-linux/tlmgr
@@ -1,6 +1,6 @@
#! /usr/bin/env texlua
--*-Lua-*-
--- $Id: tlmgr.texlua 7030 2008-03-19 21:52:43Z reinhardk $
+-- $Id: tlmgr 7297 2008-04-03 16:32:24Z preining $
-- Copyright (C) 2008 Reinhard Kotucha, Norbert Preining.
-- You may freely use, modify and/or distribute this file.
@@ -47,7 +47,7 @@ function setupperl()
end
function findscript(scriptname)
- script = kpse.find_file(scriptname, 'texmfscripts')
+ local script = kpse.find_file(scriptname, 'texmfscripts')
if script then
return script
else
@@ -56,20 +56,18 @@ function findscript(scriptname)
end
end
-function rmdir(dirn)
+function rmdir(name)
if os.type == 'windows' then
- -- we have to replace all / with \
- foo = string.gsub(dirn, '/', '\\')
- ret = os.spawn({"rmdir", "/s", "/q", foo})
+ -- code from Hans
+ os.execute("rmdir /s /q " .. name:gsub('/', '\\'))
else
- ret = os.spawn({"rm", "-rf", dirn})
+ ret = os.spawn({"rm", "-rf", name})
end
- if ret then
- return ret
- else
- io.stderr:write(filename..': removing '..dirn.." didn't work\n")
+ local ok = lfs.attributes(name)
+ if ok then
+ io.stderr:write(string.format("%s: removing '%s' didn't succeed\n",filename,name))
end
- return ret
+ return ok
end
if string.find(arg[0], '/') then -- UNIX path
@@ -130,9 +128,12 @@ if arg[1] == 'uninstall' then
rmdir(TEXDIR.."/texmf-config")
rmdir(TEXDIR.."/texmf")
rmdir(TEXDIR.."/tlpkg")
+ os.remove(TEXDIR.."/temp")
os.remove(TEXDIR.."/install-tl.log")
rmdir(TEXDIR.."/bin")
-- now everything should be removed, try to remove also TEXDIR
+ -- this will not succeed on win32 since texlua.exe is still in use
+ -- and thus removing TEXDIR/bin will not work. Damned.
os.remove(TEXDIR)
os.exit(0)
end
diff --git a/Master/bin/sparc-solaris/tlmgr b/Master/bin/sparc-solaris/tlmgr
index ac31a2e677c..07784e9405a 100755
--- a/Master/bin/sparc-solaris/tlmgr
+++ b/Master/bin/sparc-solaris/tlmgr
@@ -1,6 +1,6 @@
#! /usr/bin/env texlua
--*-Lua-*-
--- $Id: tlmgr.texlua 7030 2008-03-19 21:52:43Z reinhardk $
+-- $Id: tlmgr 7297 2008-04-03 16:32:24Z preining $
-- Copyright (C) 2008 Reinhard Kotucha, Norbert Preining.
-- You may freely use, modify and/or distribute this file.
@@ -47,7 +47,7 @@ function setupperl()
end
function findscript(scriptname)
- script = kpse.find_file(scriptname, 'texmfscripts')
+ local script = kpse.find_file(scriptname, 'texmfscripts')
if script then
return script
else
@@ -56,20 +56,18 @@ function findscript(scriptname)
end
end
-function rmdir(dirn)
+function rmdir(name)
if os.type == 'windows' then
- -- we have to replace all / with \
- foo = string.gsub(dirn, '/', '\\')
- ret = os.spawn({"rmdir", "/s", "/q", foo})
+ -- code from Hans
+ os.execute("rmdir /s /q " .. name:gsub('/', '\\'))
else
- ret = os.spawn({"rm", "-rf", dirn})
+ ret = os.spawn({"rm", "-rf", name})
end
- if ret then
- return ret
- else
- io.stderr:write(filename..': removing '..dirn.." didn't work\n")
+ local ok = lfs.attributes(name)
+ if ok then
+ io.stderr:write(string.format("%s: removing '%s' didn't succeed\n",filename,name))
end
- return ret
+ return ok
end
if string.find(arg[0], '/') then -- UNIX path
@@ -130,9 +128,12 @@ if arg[1] == 'uninstall' then
rmdir(TEXDIR.."/texmf-config")
rmdir(TEXDIR.."/texmf")
rmdir(TEXDIR.."/tlpkg")
+ os.remove(TEXDIR.."/temp")
os.remove(TEXDIR.."/install-tl.log")
rmdir(TEXDIR.."/bin")
-- now everything should be removed, try to remove also TEXDIR
+ -- this will not succeed on win32 since texlua.exe is still in use
+ -- and thus removing TEXDIR/bin will not work. Damned.
os.remove(TEXDIR)
os.exit(0)
end
diff --git a/Master/bin/win32/tlmgr.texlua b/Master/bin/win32/tlmgr.texlua
index 0543d040776..07784e9405a 100755
--- a/Master/bin/win32/tlmgr.texlua
+++ b/Master/bin/win32/tlmgr.texlua
@@ -1,6 +1,6 @@
#! /usr/bin/env texlua
--*-Lua-*-
--- $Id: tlmgr.texlua 7030 2008-03-19 21:52:43Z reinhardk $
+-- $Id: tlmgr 7297 2008-04-03 16:32:24Z preining $
-- Copyright (C) 2008 Reinhard Kotucha, Norbert Preining.
-- You may freely use, modify and/or distribute this file.
@@ -65,7 +65,7 @@ function rmdir(name)
end
local ok = lfs.attributes(name)
if ok then
- io.stderr:write(string.format("%s: removing '%s' didn't succeed\n",filename,name)
+ io.stderr:write(string.format("%s: removing '%s' didn't succeed\n",filename,name))
end
return ok
end
@@ -128,9 +128,12 @@ if arg[1] == 'uninstall' then
rmdir(TEXDIR.."/texmf-config")
rmdir(TEXDIR.."/texmf")
rmdir(TEXDIR.."/tlpkg")
+ os.remove(TEXDIR.."/temp")
os.remove(TEXDIR.."/install-tl.log")
rmdir(TEXDIR.."/bin")
-- now everything should be removed, try to remove also TEXDIR
+ -- this will not succeed on win32 since texlua.exe is still in use
+ -- and thus removing TEXDIR/bin will not work. Damned.
os.remove(TEXDIR)
os.exit(0)
end
diff --git a/Master/bin/x86_64-linux/tlmgr b/Master/bin/x86_64-linux/tlmgr
index ac31a2e677c..07784e9405a 100755
--- a/Master/bin/x86_64-linux/tlmgr
+++ b/Master/bin/x86_64-linux/tlmgr
@@ -1,6 +1,6 @@
#! /usr/bin/env texlua
--*-Lua-*-
--- $Id: tlmgr.texlua 7030 2008-03-19 21:52:43Z reinhardk $
+-- $Id: tlmgr 7297 2008-04-03 16:32:24Z preining $
-- Copyright (C) 2008 Reinhard Kotucha, Norbert Preining.
-- You may freely use, modify and/or distribute this file.
@@ -47,7 +47,7 @@ function setupperl()
end
function findscript(scriptname)
- script = kpse.find_file(scriptname, 'texmfscripts')
+ local script = kpse.find_file(scriptname, 'texmfscripts')
if script then
return script
else
@@ -56,20 +56,18 @@ function findscript(scriptname)
end
end
-function rmdir(dirn)
+function rmdir(name)
if os.type == 'windows' then
- -- we have to replace all / with \
- foo = string.gsub(dirn, '/', '\\')
- ret = os.spawn({"rmdir", "/s", "/q", foo})
+ -- code from Hans
+ os.execute("rmdir /s /q " .. name:gsub('/', '\\'))
else
- ret = os.spawn({"rm", "-rf", dirn})
+ ret = os.spawn({"rm", "-rf", name})
end
- if ret then
- return ret
- else
- io.stderr:write(filename..': removing '..dirn.." didn't work\n")
+ local ok = lfs.attributes(name)
+ if ok then
+ io.stderr:write(string.format("%s: removing '%s' didn't succeed\n",filename,name))
end
- return ret
+ return ok
end
if string.find(arg[0], '/') then -- UNIX path
@@ -130,9 +128,12 @@ if arg[1] == 'uninstall' then
rmdir(TEXDIR.."/texmf-config")
rmdir(TEXDIR.."/texmf")
rmdir(TEXDIR.."/tlpkg")
+ os.remove(TEXDIR.."/temp")
os.remove(TEXDIR.."/install-tl.log")
rmdir(TEXDIR.."/bin")
-- now everything should be removed, try to remove also TEXDIR
+ -- this will not succeed on win32 since texlua.exe is still in use
+ -- and thus removing TEXDIR/bin will not work. Damned.
os.remove(TEXDIR)
os.exit(0)
end