]> git.e2factory.org Git - e2factory.git/commitdiff
local tools: finish command line handling before setting up the
authorGordon Hecker <gh@emlix.com>
Wed, 16 Dec 2009 12:45:18 +0000 (13:45 +0100)
committerGordon Hecker <gh@emlix.com>
Wed, 16 Dec 2009 14:37:28 +0000 (15:37 +0100)
project structure

Signed-off-by: Gordon Hecker <gh@emlix.com>
local/build-numbers.lua
local/build.lua
local/playground.lua

index 60f6c6d88b02bfc82fc34e06126f6ef6ca41d37f..10936e49bc2554c5371e3b574ef378354813485e 100755 (executable)
@@ -39,6 +39,11 @@ policy.register_commandline_options()
 e2option.flag("no-sync", "do not synchronize with the server")
 
 local opts = e2option.parse(arg)
+-- get build mode from the command line
+local build_mode = policy.handle_commandline_options(opts, true)
+if not build_mode then
+       e2lib.abort("no build mode given")
+end
 local info, re = e2tool.collect_project_info()
 if not info then
   e2lib.abort(re)
@@ -48,11 +53,6 @@ if not rc then
   e2lib.abort(re)
 end
 
--- get build mode from the command line
-local build_mode = policy.handle_commandline_options(opts, true)
-if not build_mode then
-       e2lib.abort("no build mode given")
-end
 -- apply the standard build mode to all results
 for _,res in pairs(info.results) do
        res.build_mode = build_mode
index 177da3c9a1030af5608283976b56db5b82262dfb..c3febeb9b558ee00590f67655b23306b933860a8 100755 (executable)
@@ -47,6 +47,13 @@ e2option.flag("buildnumber", "use real build numbers")
 e2option.flag("buildid", "display buildids and exit")
 
 local opts = e2option.parse(arg)
+
+-- get build mode from the command line
+local build_mode = policy.handle_commandline_options(opts, true)
+if not build_mode then
+       e2lib.abort("no build mode given")
+end
+
 local info, re = e2tool.collect_project_info()
 if not info then
   e2lib.abort(re)
@@ -58,11 +65,6 @@ end
 
 e2lib.log_invocation(info, arg)
 
--- get build mode from the command line
-local build_mode = policy.handle_commandline_options(opts, true)
-if not build_mode then
-       e2lib.abort("no build mode given")
-end
 -- apply the standard build mode to all results
 for _,res in pairs(info.results) do
        res.build_mode = build_mode
index 01c854c83f684024a02dd9e5e65692eccd5d8a12..e4e1d8a6983e8198ae3ae478f6bc964e9a7e0b8d 100644 (file)
@@ -43,6 +43,11 @@ e2option.flag("runinit","run init files automatically")
 e2option.flag("showpath", "prints the path of the build directory inside the chroot to stdout" )
 
 local opts = e2option.parse(arg)
+-- get build mode from the command line
+local build_mode = policy.handle_commandline_options(opts, true)
+if not build_mode then
+       e2lib.abort("no build mode given")
+end
 local info, re = e2tool.collect_project_info()
 if not info then
   e2lib.abort(re)
@@ -60,11 +65,6 @@ end
 
 r = opts.arguments[1]
 
--- get build mode from the command line
-local build_mode = policy.handle_commandline_options(opts, true)
-if not build_mode then
-       e2lib.abort("no build mode given")
-end
 -- apply the standard build mode to all results
 for _,res in pairs(info.results) do
        res.build_mode = build_mode