diff options
Diffstat (limited to 'install.bat')
-rw-r--r-- | install.bat | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/install.bat b/install.bat index 934154d0..287bad5b 100644 --- a/install.bat +++ b/install.bat | |||
@@ -771,27 +771,27 @@ if exists(S[[$LUADIR\luarocks\site_config.lua]]) then | |||
771 | end | 771 | end |
772 | local f = io.open(vars.LUADIR.."\\luarocks\\site_config.lua", "w") | 772 | local f = io.open(vars.LUADIR.."\\luarocks\\site_config.lua", "w") |
773 | f:write(S[=[ | 773 | f:write(S[=[ |
774 | module("luarocks.site_config") | 774 | local site_config = {} |
775 | LUA_INCDIR=[[$LUA_INCDIR]] | 775 | site_config.LUA_INCDIR=[[$LUA_INCDIR]] |
776 | LUA_LIBDIR=[[$LUA_LIBDIR]] | 776 | site_config.LUA_LIBDIR=[[$LUA_LIBDIR]] |
777 | LUA_BINDIR=[[$LUA_BINDIR]] | 777 | site_config.LUA_BINDIR=[[$LUA_BINDIR]] |
778 | LUA_INTERPRETER=[[$LUA_INTERPRETER]] | 778 | site_config.LUA_INTERPRETER=[[$LUA_INTERPRETER]] |
779 | ]=]) | 779 | ]=]) |
780 | if USE_MINGW then | 780 | if USE_MINGW then |
781 | f:write("LUAROCKS_UNAME_S=[[MINGW]]\n") | 781 | f:write("site_config.LUAROCKS_UNAME_S=[[MINGW]]\n") |
782 | else | 782 | else |
783 | f:write("LUAROCKS_UNAME_S=[[WindowsNT]]\n") | 783 | f:write("site_config.LUAROCKS_UNAME_S=[[WindowsNT]]\n") |
784 | end | 784 | end |
785 | f:write(S[=[ | 785 | f:write(S[=[ |
786 | LUAROCKS_UNAME_M=[[$UNAME_M]] | 786 | site_config.LUAROCKS_UNAME_M=[[$UNAME_M]] |
787 | LUAROCKS_SYSCONFIG=[[$SYSCONFDIR\config.lua]] | 787 | site_config.LUAROCKS_SYSCONFIG=[[$SYSCONFDIR\config.lua]] |
788 | LUAROCKS_ROCKS_TREE=[[$ROCKS_TREE]] | 788 | site_config.LUAROCKS_ROCKS_TREE=[[$ROCKS_TREE]] |
789 | LUAROCKS_PREFIX=[[$PREFIX]] | 789 | site_config.LUAROCKS_PREFIX=[[$PREFIX]] |
790 | LUAROCKS_DOWNLOADER=[[wget]] | 790 | site_config.LUAROCKS_DOWNLOADER=[[wget]] |
791 | LUAROCKS_MD5CHECKER=[[md5sum]] | 791 | site_config.LUAROCKS_MD5CHECKER=[[md5sum]] |
792 | ]=]) | 792 | ]=]) |
793 | if FORCE_CONFIG then | 793 | if FORCE_CONFIG then |
794 | f:write("local LUAROCKS_FORCE_CONFIG=true\n") | 794 | f:write("site_config.LUAROCKS_FORCE_CONFIG=true\n") |
795 | end | 795 | end |
796 | if exists(vars.LUADIR.."\\luarocks\\site_config.lua.bak") then | 796 | if exists(vars.LUADIR.."\\luarocks\\site_config.lua.bak") then |
797 | for line in io.lines(vars.LUADIR.."\\luarocks\\site_config.lua.bak", "r") do | 797 | for line in io.lines(vars.LUADIR.."\\luarocks\\site_config.lua.bak", "r") do |
@@ -800,6 +800,7 @@ if exists(vars.LUADIR.."\\luarocks\\site_config.lua.bak") then | |||
800 | end | 800 | end |
801 | exec(S[[DEL /F /Q "$LUADIR\luarocks\site_config.lua.bak"]]) | 801 | exec(S[[DEL /F /Q "$LUADIR\luarocks\site_config.lua.bak"]]) |
802 | end | 802 | end |
803 | f:write("return site_config\n") | ||
803 | f:close() | 804 | f:close() |
804 | print(S[[Created LuaRocks site-config file: $LUADIR\luarocks\site_config.lua]]) | 805 | print(S[[Created LuaRocks site-config file: $LUADIR\luarocks\site_config.lua]]) |
805 | 806 | ||