29 CFG_DATADIR = CFG_DATADIR:gsub("^~", os.getenv("HOME")); |
29 CFG_DATADIR = CFG_DATADIR:gsub("^~", os.getenv("HOME")); |
30 end |
30 end |
31 end |
31 end |
32 |
32 |
33 -- Required to be able to find packages installed with luarocks |
33 -- Required to be able to find packages installed with luarocks |
34 pcall(require, "luarocks.require") |
34 if not pcall(require, "luarocks.loader") then -- Try LuaRocks 2.x |
|
35 pcall(require, "luarocks.require") -- Try LuaRocks 1.x |
|
36 end |
35 |
37 |
36 -- Replace require with one that doesn't pollute _G |
38 -- Replace require with one that doesn't pollute _G |
37 do |
39 do |
38 local _realG = _G; |
40 local _realG = _G; |
39 local _real_require = require; |
41 local _real_require = require; |