]> git.e2factory.org Git - e2factory.git/commitdiff
bugfix: use template configuration file for proj/env
authorGordon Hecker <gh@emlix.com>
Thu, 6 May 2010 10:29:33 +0000 (12:29 +0200)
committerGordon Hecker <gh@emlix.com>
Mon, 17 May 2010 09:32:33 +0000 (11:32 +0200)
Signed-off-by: Gordon Hecker <gh@emlix.com>
global/e2-create-project.lua.in
templates/proj/config

index e955cb64dffa30335e8feeac0b74c7e03cbdc649..0343efc41a4b38aa6c7ef2308f4fa5647a64aaf1 100755 (executable)
@@ -164,18 +164,12 @@ local env, re = e2lib.read_template("proj/env")
 if not env then
   e2lib.abort(re)
 end
--- XXX moge pconfig to builtin template table file
-local pconfig = [[
--- e2factory project configuration file --
-
-e2project {
-       name = "%s",
-       release_id = "%s",
-       default_results = { },
-       chroot_arch = "x86_32",
-}
-]]
-pconfig = string.format(pconfig, p.name, p.name)
+local pconfig, re = e2lib.read_template("proj/config")
+if not pconfig then
+  e2lib.abort(re)
+end
+pconfig = pconfig:gsub("<<release_id>>", p.name)
+pconfig = pconfig:gsub("<<name>>", p.name)
 local name = string.format("%s\n", p.name)
 local release_id = string.format("%s\n", p.name) -- use the name for now
 local version = string.format("%s\n", p.version)
index e9f37ddb02842bc6ced7a73dea60e56e99399218..0b9a29fe830485bcf561283c9720004dc0cc2186 100644 (file)
@@ -1,7 +1,7 @@
 e2project {
        -- these must be configured
-       name = "project",
-       release_id = "release-id",
+       name = "<<name>>",
+       release_id = "<<release_id>>",
        default_results = { },
        deploy_results = {
        },