]> git.e2factory.org Git - e2factory.git/commitdiff
call global tools with LUA_PATH and LUA_CPATH set. This makes setting
authorGordon Hecker <gh@emlix.com>
Thu, 30 Apr 2009 14:20:48 +0000 (16:20 +0200)
committerGordon Hecker <gh@emlix.com>
Tue, 5 May 2009 15:08:10 +0000 (17:08 +0200)
package.path and package.cpath in the code obsolete.

Signed-off-by: Gordon Hecker <gh@emlix.com>
Conflicts:

global/e2-install-e2.lua.in

global/e2-create-project.lua.in
global/e2-fetch-project.lua.in
global/e2-install-e2.lua.in
global/e2.lua.in
global/e2global.lua.in

index a2e7de8f0dac29ab8a4084740fde3d58c5debec8..f0060222c088e62aa4b275925e319d3878a9e228 100755 (executable)
@@ -25,9 +25,6 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ]]
 
-package.path="@LIBDIR@/?.lc;@LIBDIR@/?.lua"
-package.cpath="@LIBDIR@/?.so"
-
 require("e2global")
 e2lib.init()
 
index e21f4c17195abb5ac44d0bca644b195ec3aebb2c..56c9534a039fbd72eedb3462f0013a9caa80249b 100755 (executable)
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ]]
 
-e2_install_e2 = "@LIBEXECDIR@/e2-lua-@LUA_VERSION@ @TOOLDIR@/e2-install-e2"
-
-package.path="@LIBDIR@/?.lc;@LIBDIR@/?.lua"
-package.cpath="@LIBDIR@/?.so"
-
 require("e2global")
+
 e2lib.init()
 local e = new_error("fetching project failed")
 local doc = [[
@@ -183,6 +179,8 @@ if not rc then
 end
 
 -- call e2-install-e2
+e2_install_e2 = string.format("'%s' '%s/e2-install-e2'", 
+                       getinstallpath("LUA"), getinstallpath("TOOLDIR"))
 rc, re = e2lib.callcmd_log(e2_install_e2)
 if not rc then
        e:append("installing local e2 failed")
index ff359c8e75ba6245faf51b138008693299c30096..a7d56ed4d07dc868ec9233181df663e9bfcb4c98 100755 (executable)
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ]]
 
-package.path  = "@LIBDIR@/?.lc;@LIBDIR@/?.lua"
-package.cpath = "@LIBDIR@/?.so"
-
-local install_prefix = "@E2_PREFIX@"
-
 require("e2global")
 e2lib.init()
 
index e4c954663f3519232e697c5dfb58f1b20ed8316e..40ce7f8a6846a5bbaa19ddec16e997b48e5cf03e 100755 (executable)
@@ -81,7 +81,10 @@ end
 
 if e2util.stat(e2call.globaltool) then
   e2call.tool = e2call.globaltool
-  cmd = "@LIBEXECDIR@/e2-lua-@LUA_VERSION@ " .. e2call.tool .. " " .. e2call.arg_string
+  env = "LUA_PATH='@LIBDIR@/?.lc;@LIBDIR@/?.lua'" ..
+        "LUA_CPATH='@LIBDIR@/?.so'"
+  lua = "@LIBEXECDIR@/e2-lua-@LUA_VERSION@"
+  cmd = string.format("%s %s %s %s", env, lua, e2call.tool, e2call.arg_string)
 elseif not root then
   e2lib.abort(e2call.toolname .. 
        " is not a global tool and we're not in a project environment")
index fc90950eae962881c3730a5815297cae79c500a8..8ec353b4242388f2ef07f71e4b67c5d2532a5764 100644 (file)
@@ -47,7 +47,7 @@ install [ "BINDIR" ] = "@BINDIR@"
 install [ "LIBDIR" ] = "@LIBDIR@"
 install [ "LIBEXECDIR" ] = "@LIBEXECDIR@"
 install [ "TOOLDIR" ] = "@TOOLDIR@"
-
+install [ "LUA" ] = "@LIBEXECDIR@/e2-lua-@LUA_VERSION@"
 
 -- getinstallpath(var)
 --