]> git.e2factory.org Git - e2factory.git/commitdiff
honour config file config in e2-install-e2
authorGordon Hecker <gh@emlix.com>
Tue, 23 Mar 2010 11:18:41 +0000 (12:18 +0100)
committerGordon Hecker <gh@emlix.com>
Tue, 23 Mar 2010 11:35:10 +0000 (12:35 +0100)
Signed-off-by: Gordon Hecker <gh@emlix.com>
Changelog
global/e2-install-e2.lua.in

index 15c45e52320f45577b90bf25210a7fb25f739721..cc24212f9f8635a71cd08885c01f0a3af6b020b1 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -1,5 +1,7 @@
 NEXT:
  * version information for plugins is displayed now when requested
+ * configuration file setting in .e2/e2config is honoured in e2-install-e2
+   now
 
 e2factory-2.3.4rc1
  * the plugin interface was extended to permit plugins to register
index ddd113f64bed6aa232ead7eb577637a9e43e47dd..d8c8277da5240f54bd585bfbc639693661e145f0 100755 (executable)
@@ -41,7 +41,18 @@ Installs local tools in project environment.
 ]]
 
 local opts = e2option.parse(arg)
-local rc, e = e2lib.read_global_config()
+
+local root = e2lib.locate_project_root()
+if not root then
+  e2lib.abort("can't locate project root.")
+end
+
+-- try to get project specific config file paht
+local config_file_config = string.format("%s/%s", root, e2lib.globals.e2config)
+local config_file = e2lib.read_line(config_file_config)
+-- don't care if this succeeds, the parameter is optional.
+
+local rc, e = e2lib.read_global_config(config_file)
 if not rc then
   e2lib.abort(e)
 end
@@ -65,11 +76,6 @@ if #opts.arguments > 0 then
   e2option.usage(1)
 end
 
-local root = e2lib.locate_project_root()
-if not root then
-  e2lib.abort("can't locate project root.")
-end
-
 local rc, re
 
 -- change to the project root directory