summaryrefslogtreecommitdiff
path: root/Master/bin/i386-freebsd
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-04-03 17:38:03 +0000
committerNorbert Preining <preining@logic.at>2008-04-03 17:38:03 +0000
commitaddb70a319f6736c7f26528c8576b04c34f5b952 (patch)
treecdf29a5c618b7c6bb9b13d31068f9344415eb757 /Master/bin/i386-freebsd
parentbea828eecb92932852bf9e1dd13ccf6b9d0fa142 (diff)
tlmgr with asking back before removal
git-svn-id: svn://tug.org/texlive/trunk@7303 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/bin/i386-freebsd')
-rwxr-xr-xMaster/bin/i386-freebsd/tlmgr93
1 files changed, 51 insertions, 42 deletions
diff --git a/Master/bin/i386-freebsd/tlmgr b/Master/bin/i386-freebsd/tlmgr
index 07784e9405a..f5cbb5c168b 100755
--- a/Master/bin/i386-freebsd/tlmgr
+++ b/Master/bin/i386-freebsd/tlmgr
@@ -1,6 +1,6 @@
#! /usr/bin/env texlua
--*-Lua-*-
--- $Id: tlmgr 7297 2008-04-03 16:32:24Z preining $
+-- $Id: tlmgr 7301 2008-04-03 16:52:55Z preining $
-- Copyright (C) 2008 Reinhard Kotucha, Norbert Preining.
-- You may freely use, modify and/or distribute this file.
@@ -16,6 +16,7 @@
-- generate-updmap generate-updmap.pl
-- generate-language generate-language.pl
-- uninstall uninstall-tl.pl and local code
+-- update tl-package-manager.pl
-- install tl-package-manager.pl
-- remove tl-package-manager.pl
-- search tl-package-manager.pl
@@ -93,49 +94,57 @@ if arg[1] == 'help' then
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
- -- that should remove all the stuff
- -- Or other options?
- setupperl()
- script = findscript('uninstall-tl.pl')
- if script then
- command = { perlbin, script }
+ print("If you answer yes here the whole TeX Live installation will be removed!")
+ io.stdout:write("Remove TeX Live (y/N): ")
+ local yesno = io.read()
+ if yesno == 'y' or yesno == 'Y' or yesno == 'yes' or yesno == 'YES' then
+ print ("Ok, 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
+ -- that should remove all the stuff
+ -- Or other options?
+ setupperl()
+ script = findscript('uninstall-tl.pl')
+ if script then
+ command = { perlbin, script }
+ else
+ os.exit(1)
+ end
+ for i=1, #arg do
+ command[#command+1] = arg[i]
+ end
+ command = fixwin(command)
+ ret = os.spawn(command)
+ -- here we should check the return value!!!
+ if not ret then
+ io.stderr:write(filename..': The removal script uninstall-tl.pl returned false\n')
+ io.stderr:write(filename..": We don't continue removing stuff\n")
+ os.exit(1)
+ end
+ -- on windows we have now removed the associations etc, while
+ -- on unix we have removed the symlinks in case they were present
+ --
+ -- now we have to remove all the files and directories
+ rmdir(TEXDIR.."/texmf-dist")
+ rmdir(TEXDIR.."/texmf-doc")
+ rmdir(TEXDIR.."/texmf-var")
+ 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)
else
- os.exit(1)
- end
- for i=1, #arg do
- command[#command+1] = arg[i]
+ print("Ok, cancelling the removal.")
+ os.exit(0)
end
- command = fixwin(command)
- ret = os.spawn(command)
- -- here we should check the return value!!!
- if not ret then
- io.stderr:write(filename..': The removal script uninstall-tl.pl returned false\n')
- io.stderr:write(filename..": We don't continue removing stuff\n")
- os.exit(1)
- end
- -- on windows we have now removed the associations etc, while
- -- on unix we have removed the symlinks in case they were present
- --
- -- now we have to remove all the files and directories
- rmdir(TEXDIR.."/texmf-dist")
- rmdir(TEXDIR.."/texmf-doc")
- rmdir(TEXDIR.."/texmf-var")
- 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
if arg[1] == 'generate-fmtutil' then