summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-06-06 23:30:48 +0000
committerKarl Berry <karl@freefriends.org>2011-06-06 23:30:48 +0000
commit6d1a9ad4a1204696e28c5ec4177dfb7c7cd8f75a (patch)
treedbe36a3879c9c57d75b9371622f9b1822f03edd7
parent01b984e0ce46289112b09abe5e65f55311804afb (diff)
no more luatools.lua
git-svn-id: svn://tug.org/texlive/trunk@22840 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/texdoc/texdoc.tlu95
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/texlive/tlmgr.pl1
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl1
3 files changed, 3 insertions, 94 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/texdoc/texdoc.tlu b/Build/source/texk/texlive/linked_scripts/texdoc/texdoc.tlu
index 875450ff8ff..919e381ec33 100755
--- a/Build/source/texk/texlive/linked_scripts/texdoc/texdoc.tlu
+++ b/Build/source/texk/texlive/linked_scripts/texdoc/texdoc.tlu
@@ -1,96 +1,7 @@
#!/usr/bin/env texlua
---[[
-Copyright 2008, 2009 Manuel Pégourié-Gonnard.
-This program is free software: you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free Software
-Foundation, either version 3 of the License, or (at your option) any later
-version.
+-- texdoc.tlu: small wrapper around main.tlu
+-- (makes it easier to install a new version of texdoc in TEXMFHOME)
-This program is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along with
-this program. If not, see <http://www.gnu.org/licenses/>.
-
-Previous work in the public domain:
-- Contributions from Reinhard Kotucha (2008).
-- First texlua versions by Frank Küster (2007).
-- Original shell script by Thomas Esser, David Aspinall, and Simon Wilkinson.
---]]
-
----------------------- functions handling submodules -----------------------
-
--- texdoc is divided in submodules (files).
--- Most submodules use a private environment: that is, the functions and
--- variables defined in a file won't be globally visible, unless explicitly
--- exported at the end of the file.
--- Also, symbols from the global environment (hence from other submodules)
--- aren't imported in the local environment, except if explicitly requested and
--- a few default symbols.
-
--- load a local environment, importing symbols from (this function's) _G
--- usage: local L = {} load_env(L, {'a', 'b'})
-function load_env(l, symbols)
- local default = {
- 'export_symbols',
- 'string', 'table', 'pairs', 'ipairs', 'tonumber', 'tostring', 'next',
- 'assert', 'error', 'err_print', 'deb_print',
- 'C',
- }
- for _, symb in ipairs(default) do
- l[symb] = _G[symb]
- end
- local _, symb
- for _, symb in ipairs(symbols) do
- assert(_G[symb] ~= nil,
- 'Internal error: trying to import undefined symbol '..symb..'.')
- l[symb] = _G[symb]
- end
- setfenv(2, l)
-end
-
--- export symbols from a local environment to (this fonction's) _G
-function export_symbols(l, symbols)
- local _, symb
- for _, symb in ipairs(symbols) do
- assert(l[symb] ~= nil,
- 'Internal error: trying to export undefined symbol '..symb..'.')
- assert(_G[symb] == nil,
- 'Internal error: trying to export existing symbol '..symb..'.')
- _G[symb] = l[symb]
- end
-end
-
--- execute a submodule of texdoc
-function texdoc_do(name)
- local f = kpse.find_file(name..'.tlu', 'texmfscripts')
- assert(f, 'Internal error: unable to find texdoc module '..name..'.')
- dofile(f)
-end
-
------------------------- initilisation & main code -------------------------
-
--- initialize kpathsea
kpse.set_program_name(arg[-1], 'texdoc')
-
--- declare global variables;
--- they will be made read-only as soon as they are set
-C = {} -- constants
-config = {} -- configuration settings
-
--- actually load the submodules now
-texdoc_do('constants')
-texdoc_do('functions')
-texdoc_do('alias')
-texdoc_do('score')
-texdoc_do('config')
-texdoc_do('search')
-texdoc_do('view')
-
--- execute main()
-texdoc_do('main')
-
--- the end
-os.exit(C.exit_ok)
+require('texdoc.main')
diff --git a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
index 5f9c9785392..04eb02a94b1 100755
--- a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
+++ b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
@@ -3951,7 +3951,6 @@ sub check_runfiles {
|language\.dat
|language\.def
|libertine\.sty
- |luatools\.lua
|m-tex4ht\.tex
|metatex\.tex
|ps2mfbas\.mf
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index 606f0acbc4d..eed69d16d4d 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -3951,7 +3951,6 @@ sub check_runfiles {
|language\.dat
|language\.def
|libertine\.sty
- |luatools\.lua
|m-tex4ht\.tex
|metatex\.tex
|ps2mfbas\.mf