aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2019-07-26 17:10:24 -0300
committerHisham Muhammad <hisham@gobolinux.org>2019-07-26 23:58:19 -0300
commit4dd439f804844ce82c1519eede0e9201db72ba77 (patch)
treec8c48eb27d6566b7feb349ffdec241b6c35cdd20
parent0e695f1a222e05662f091b7cfc9d6a522c628d7f (diff)
downloadluarocks-4dd439f804844ce82c1519eede0e9201db72ba77.tar.gz
luarocks-4dd439f804844ce82c1519eede0e9201db72ba77.tar.bz2
luarocks-4dd439f804844ce82c1519eede0e9201db72ba77.zip
GNUmakefile: copy config file prior to running 'luarocks init'
As originally suggested by @blueyed in #1043.
-rw-r--r--.gitignore1
-rw-r--r--GNUmakefile3
2 files changed, 3 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 99850056..23f76e8a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,3 +15,4 @@
15/lua 15/lua
16/lua_modules 16/lua_modules
17/luarocks 17/luarocks
18/.luarocks
diff --git a/GNUmakefile b/GNUmakefile
index 7b877bc9..22f1e918 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -47,13 +47,14 @@ $(builddir)/config-$(LUA_VERSION).lua: config.unix
47 > $@ 47 > $@
48 48
49luarocks: config.unix $(builddir)/config-$(LUA_VERSION).lua 49luarocks: config.unix $(builddir)/config-$(LUA_VERSION).lua
50 mkdir -p .luarocks
51 cp $(builddir)/config-$(LUA_VERSION).lua .luarocks/config-$(LUA_VERSION).lua
50 rm -f src/luarocks/core/hardcoded.lua 52 rm -f src/luarocks/core/hardcoded.lua
51 echo "#!/bin/sh" > luarocks 53 echo "#!/bin/sh" > luarocks
52 echo "unset LUA_PATH LUA_PATH_5_2 LUA_PATH_5_3 LUA_PATH_5_4 LUA_CPATH LUA_CPATH_5_2 LUA_CPATH_5_3 LUA_CPATH_5_4" >> luarocks 54 echo "unset LUA_PATH LUA_PATH_5_2 LUA_PATH_5_3 LUA_PATH_5_4 LUA_CPATH LUA_CPATH_5_2 LUA_CPATH_5_3 LUA_CPATH_5_4" >> luarocks
53 echo 'LUAROCKS_SYSCONFDIR="$(luarocksconfdir)" LUA_PATH="$(CURDIR)/src/?.lua;;" exec "$(LUA)" "$(CURDIR)/src/bin/luarocks" --project-tree="$(CURDIR)/lua_modules" "$$@"' >> luarocks 55 echo 'LUAROCKS_SYSCONFDIR="$(luarocksconfdir)" LUA_PATH="$(CURDIR)/src/?.lua;;" exec "$(LUA)" "$(CURDIR)/src/bin/luarocks" --project-tree="$(CURDIR)/lua_modules" "$$@"' >> luarocks
54 chmod +rx ./luarocks 56 chmod +rx ./luarocks
55 ./luarocks init 57 ./luarocks init
56 cp $(builddir)/config-$(LUA_VERSION).lua .luarocks/config-$(LUA_VERSION).lua
57 58
58luarocks-admin: config.unix 59luarocks-admin: config.unix
59 rm -f src/luarocks/core/hardcoded.lua 60 rm -f src/luarocks/core/hardcoded.lua