diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2013-10-29 19:28:42 -0200 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2013-10-29 19:28:42 -0200 |
commit | d82cc27ddda123d452a68357db49051cc24267ae (patch) | |
tree | 78cc564128d2a307e608981db6c9b1bf338fbb97 | |
parent | 86d183efd39ddf113b0518eb3e969779fa52197d (diff) | |
parent | c815ed22917c19a04b05dc0dedd9127aa4e18a43 (diff) | |
download | luarocks-d82cc27ddda123d452a68357db49051cc24267ae.tar.gz luarocks-d82cc27ddda123d452a68357db49051cc24267ae.tar.bz2 luarocks-d82cc27ddda123d452a68357db49051cc24267ae.zip |
Merge branch 'master' of github.com:keplerproject/luarocks
-rw-r--r-- | src/luarocks/cfg.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/luarocks/cfg.lua b/src/luarocks/cfg.lua index 2da72db0..b8e3a500 100644 --- a/src/luarocks/cfg.lua +++ b/src/luarocks/cfg.lua | |||
@@ -106,6 +106,7 @@ end | |||
106 | local sys_config_file, home_config_file | 106 | local sys_config_file, home_config_file |
107 | local sys_config_dir, home_config_dir | 107 | local sys_config_dir, home_config_dir |
108 | local sys_config_ok, home_config_ok = false, false | 108 | local sys_config_ok, home_config_ok = false, false |
109 | local extra_luarocks_module_dir | ||
109 | sys_config_dir = site_config.LUAROCKS_SYSCONFDIR | 110 | sys_config_dir = site_config.LUAROCKS_SYSCONFDIR |
110 | if detected.windows then | 111 | if detected.windows then |
111 | home = os.getenv("APPDATA") or "c:" | 112 | home = os.getenv("APPDATA") or "c:" |
@@ -268,6 +269,7 @@ local defaults = { | |||
268 | 269 | ||
269 | if detected.windows then | 270 | if detected.windows then |
270 | local full_prefix = site_config.LUAROCKS_PREFIX.."\\"..major_version | 271 | local full_prefix = site_config.LUAROCKS_PREFIX.."\\"..major_version |
272 | extra_luarocks_module_dir = full_prefix.."\\lua\\?.lua" | ||
271 | 273 | ||
272 | home_config_file = home_config_file and home_config_file:gsub("\\","/") | 274 | home_config_file = home_config_file and home_config_file:gsub("\\","/") |
273 | defaults.fs_use_modules = false | 275 | defaults.fs_use_modules = false |
@@ -293,8 +295,8 @@ if detected.windows then | |||
293 | defaults.variables.LIBFLAG = "/dll" | 295 | defaults.variables.LIBFLAG = "/dll" |
294 | defaults.variables.LUALIB = "lua"..lua_version..".lib" | 296 | defaults.variables.LUALIB = "lua"..lua_version..".lib" |
295 | 297 | ||
296 | local bins = { "SEVENZ", "CHMOD", "CP", "FIND", "LS", "MD5SUM", | 298 | local bins = { "SEVENZ", "CP", "FIND", "LS", "MD5SUM", |
297 | "MKDIR", "MV", "PWD", "RMDIR", "RM", "TEST", "UNAME", "WGET" } | 299 | "MKDIR", "MV", "PWD", "RMDIR", "TEST", "UNAME", "WGET" } |
298 | for _, var in ipairs(bins) do | 300 | for _, var in ipairs(bins) do |
299 | if defaults.variables[var] then | 301 | if defaults.variables[var] then |
300 | defaults.variables[var] = full_prefix.."\\bin\\"..defaults.variables[var] | 302 | defaults.variables[var] = full_prefix.."\\bin\\"..defaults.variables[var] |
@@ -477,7 +479,7 @@ local cfg_mt = { | |||
477 | setmetatable(_M, cfg_mt) | 479 | setmetatable(_M, cfg_mt) |
478 | 480 | ||
479 | function package_paths() | 481 | function package_paths() |
480 | local new_path, new_cpath = {}, {} | 482 | local new_path, new_cpath = { extra_luarocks_module_dir }, {} |
481 | for _,tree in ipairs(rocks_trees) do | 483 | for _,tree in ipairs(rocks_trees) do |
482 | if type(tree) == "string" then | 484 | if type(tree) == "string" then |
483 | table.insert(new_path, 1, tree..lua_modules_path.."/?.lua;"..tree..lua_modules_path.."/?/init.lua") | 485 | table.insert(new_path, 1, tree..lua_modules_path.."/?.lua;"..tree..lua_modules_path.."/?/init.lua") |