summaryrefslogtreecommitdiff
path: root/luaotfload-tool.lua
diff options
context:
space:
mode:
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