summaryrefslogtreecommitdiff
path: root/luaotfload-tool.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-05-10 21:38:13 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2013-05-10 21:38:13 +0200
commit82fd7d8aab5f5603b7fb00191efc6f6bbe73ab0b (patch)
tree375e96b504325a21c603523b594a83309034fed5 /luaotfload-tool.lua
parent9f77d35d0ab9b863e792bfecd4b61b7b3ef8061c (diff)
downloadluaotfload-82fd7d8aab5f5603b7fb00191efc6f6bbe73ab0b.tar.gz
divert Lua<5.2 to legacy script in luaotfload-tool
Diffstat (limited to 'luaotfload-tool.lua')
-rwxr-xr-xluaotfload-tool.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua
index 2c525d9..b16fe49 100755
--- a/luaotfload-tool.lua
+++ b/luaotfload-tool.lua
@@ -26,6 +26,20 @@ see the luaotfload documentation for more info. Report bugs to
--doc]]--
+--[[doc--
+
+ We test for Lua 5.1 by means of capability detection to see if
+ we’re running an outdated Luatex. If so, we hand over control to
+ the legacy db runner.
+
+ \url{http://lua-users.org/wiki/LuaVersionCompatibility}
+
+--doc]]--
+
+if _G.getfenv then
+ return require"luaotfload-legacy-tool"
+end
+
kpse.set_program_name"luatex"
local stringformat = string.format