Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorSebastian Dziallas <sebastian@when.com>2009-03-19 15:59:33 (GMT)
committer Sebastian Dziallas <sebastian@when.com>2009-03-19 15:59:33 (GMT)
commit67b6f900b2f5de6464c6b1be0cc6dfdc95caaed0 (patch)
tree72836837234b31f84eddf478729b8719a8017885 /build
parent9a42ffda2e61d5fd1fdb70b6c1dc1c1f80b94834 (diff)
add creation of live image again to build script
Diffstat (limited to 'build')
-rwxr-xr-xbuild26
1 files changed, 25 insertions, 1 deletions
diff --git a/build b/build
index 27116fb..626501f 100755
--- a/build
+++ b/build
@@ -17,6 +17,30 @@ last_file = os.path.join(images_dir, 'last')
def main():
+ if not os.path.exists(images_dir):
+ os.mkdir(images_dir)
+
+ image_date = strftime("%Y%m%d%H%M", gmtime())
+ image_name = 'Soas2-%s' % image_date
+ if os.path.exists(os.path.join(images_dir, image_name + '.iso')):
+ print 'Image %s exist already' % image_name
+ sys.exit(2)
+
+ ks = imgcreate.read_kickstart(os.path.join(base_dir, 'soas-sugar.ks'))
+ creator = imgcreate.LiveImageCreator(ks, image_name, image_name)
+
+ try:
+ creator.mount(cachedir=cache_dir)
+ creator.install()
+ creator.configure()
+ creator.unmount()
+ creator.package(destdir=images_dir)
+ except imgcreate.CreatorError, e:
+ logging.error("Error creating Live CD : %s" % e)
+ return 1
+ finally:
+ creator.cleanup()
+
if not os.path.exists(appliances_dir):
os.mkdir(appliances_dir)
@@ -34,7 +58,7 @@ def main():
creator.install()
creator.configure()
creator.unmount()
- creator.package(appliances_dir, package, include)
+ creator.package(appliances_dir)
except imgcreate.CreatorError, e:
logging.error("Unable to create appliance : %s" % e)
return 1