From 835bdb095a099bcaf82cb7c2f9e28b10658ef188 Mon Sep 17 00:00:00 2001 From: Gordon Hecker Date: Tue, 23 Mar 2010 12:18:41 +0100 Subject: [PATCH] honour config file config in e2-install-e2 Signed-off-by: Gordon Hecker --- Changelog | 2 ++ global/e2-install-e2.lua.in | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Changelog b/Changelog index 15c45e5..cc24212 100644 --- 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 diff --git a/global/e2-install-e2.lua.in b/global/e2-install-e2.lua.in index ddd113f..d8c8277 100755 --- a/global/e2-install-e2.lua.in +++ b/global/e2-install-e2.lua.in @@ -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 -- 2.39.5