summaryrefslogtreecommitdiff
path: root/Master/bin/i386-linux/tlmgr
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-04-03 16:26:37 +0000
committerNorbert Preining <preining@logic.at>2008-04-03 16:26:37 +0000
commita32235a1a71c8bc8e313eda44942834099b26828 (patch)
tree16c5d897de39935f66869dd7174cd3b64b2f8af6 /Master/bin/i386-linux/tlmgr
parent410d8fa9a8e9b7873dcfbce8d58a156a1cea9af4 (diff)
small updates to tlmgr, but far from finished
git-svn-id: svn://tug.org/texlive/trunk@7295 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/bin/i386-linux/tlmgr')
-rwxr-xr-xMaster/bin/i386-linux/tlmgr74
1 files changed, 43 insertions, 31 deletions
diff --git a/Master/bin/i386-linux/tlmgr b/Master/bin/i386-linux/tlmgr
index 7dcc72ca73c..ac31a2e677c 100755
--- a/Master/bin/i386-linux/tlmgr
+++ b/Master/bin/i386-linux/tlmgr
@@ -11,26 +11,28 @@
-- and other places
--
-- Currently supported arguments
--- help local, not implemented
--- generate-fmtutil generate-fmtutil.pl
--- generate-updmap generate-updmap.pl
--- generate-language generate-language.pl
--- install tl-package-manager.pl
--- remove tl-package-manager.pl
--- search tl-package-manager.pl
--- globalsearch tl-package-manager.pl
+-- help local, not implemented
+-- generate-fmtutil generate-fmtutil.pl
+-- generate-updmap generate-updmap.pl
+-- generate-language generate-language.pl
+-- uninstall uninstall-tl.pl and local code
+-- install tl-package-manager.pl
+-- remove tl-package-manager.pl
+-- search tl-package-manager.pl
+-- globalsearch tl-package-manager.pl
+-- * tl-package-manager.pl
function fixwin(args_unix)
- if os.type == 'windows' then
- local args_win={} -- new table
- args_win[0]=args_unix[1]
- for i=1, #args_unix do
- args_win[i]='"'..args_unix[i]..'"'
- end
- return args_win
- else
- return args_unix
- end
+ if os.type == 'windows' then
+ local args_win={} -- new table
+ args_win[0]=args_unix[1]
+ for i=1, #args_unix do
+ args_win[i]='"'..args_unix[i]..'"'
+ end
+ return args_win
+ else
+ return args_unix
+ end
end
function setupperl()
@@ -56,24 +58,26 @@ end
function rmdir(dirn)
if os.type == 'windows' then
- ret = os.spawn({"rmdir", "/s", "/q", dirn})
+ -- we have to replace all / with \
+ foo = string.gsub(dirn, '/', '\\')
+ ret = os.spawn({"rmdir", "/s", "/q", foo})
else
ret = os.spawn({"rm", "-rf", dirn})
end
if ret then
return ret
else
- io.stderr:write(filename..': removing '..dirn.." didn't work")
+ io.stderr:write(filename..': removing '..dirn.." didn't work\n")
end
return ret
end
if string.find(arg[0], '/') then -- UNIX path
- filename=select(1, string.gsub(arg[0], '.*/', ''))
+ filename=select(1, string.gsub(arg[0], '.*/', ''))
elseif string.find(arg[0], '\\') then -- Windows path
- filename=select(1, string.gsub(arg[0], '.*\\', ''))
+ filename=select(1, string.gsub(arg[0], '.*\\', ''))
else -- no path
- filename=arg[0]
+ filename=arg[0]
end
@@ -92,9 +96,10 @@ end
if arg[1] == 'uninstall' then
print ("removing the whole installation")
- -- we have to call perl uninstall-tl.pl AND have to remove the following files:
- -- TEXDIR/texmf{,-dist,-doc,-var,-config,}, TEXDIR/bin, TEXDIR/tlpkg, TEXDIR/install-tl.log
- -- TEXMFSYSVAR
+ -- we have to call perl uninstall-tl.pl AND have to remove the following
+ -- files:
+ -- TEXDIR/texmf{,-dist,-doc,-var,-config,}, TEXDIR/bin, TEXDIR/tlpkg,
+ -- TEXDIR/install-tl.log, TEXMFSYSVAR
-- that should remove all the stuff
-- Or other options?
setupperl()
@@ -162,8 +167,10 @@ if arg[1] == 'generate-updmap' then
end
end
-if arg[1] == 'install' or arg[1] == 'remove' or arg[1] == 'search' or
- arg[1] == 'globalsearch' then
+-- in all other cases we call tl-package-manager for now ...
+--
+-- if arg[1] == 'install' or arg[1] == 'remove' or arg[1] == 'search' or
+-- arg[1] == 'globalsearch' then
setupperl()
script = findscript('tl-package-manager.pl')
if script then
@@ -171,10 +178,10 @@ if arg[1] == 'install' or arg[1] == 'remove' or arg[1] == 'search' or
else
os.exit(1)
end
-end
+-- end
for i=1, #arg do
- command[#command+1]=arg[i]
+ command[#command+1]=arg[i]
end
command=fixwin(command)
@@ -182,4 +189,9 @@ command=fixwin(command)
ret=os.spawn(command)
os.exit(ret)
-
+-- Local Variables:
+-- perl-indent-level: 2
+-- tab-width: 2
+-- indent-tabs-mode: nil
+-- End:
+-- vim:set tabstop=2 expandtab: --