Commit 98f36c4e authored by Łukasz Nowak's avatar Łukasz Nowak

Implemnet update_script support.

parent 99886261
......@@ -226,6 +226,7 @@ class Script:
return True
script = 'raise NotImplementedError'
update_script = None
def __init__(self, buildout, name, options):
self.cleanup_dir_list = []
......@@ -294,8 +295,16 @@ class Script:
return [self.options['location']]
def update(self):
pass
if self.update_script is None:
return None
try:
env = self.getEnvironment()
exec self.options['update_script']
finally:
for d in self.cleanup_dir_list:
if os.path.exists(d):
self.logger.debug('Cleanup directory %r' % d)
shutil.rmtree(d)
class Cmmi(Script):
"""Simple configure-make-make-insall compatible with hexagonit.recipe.cmmi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment