Commit a753a107 authored by Marco Mariani's avatar Marco Mariani

internal environment recipe

parent 86fac749
...@@ -89,6 +89,7 @@ setup(name=name, ...@@ -89,6 +89,7 @@ setup(name=name,
'dumpmdb = slapos.recipe.dumpmdb:Recipe', 'dumpmdb = slapos.recipe.dumpmdb:Recipe',
'duplicity = slapos.recipe.duplicity:Recipe', 'duplicity = slapos.recipe.duplicity:Recipe',
'egg_test = slapos.recipe.erp5_test:EggTestRecipe', 'egg_test = slapos.recipe.erp5_test:EggTestRecipe',
'environment = slapos.recipe.environment:Recipe',
'equeue = slapos.recipe.equeue:Recipe', 'equeue = slapos.recipe.equeue:Recipe',
'erp5.bootstrap = slapos.recipe.erp5_bootstrap:Recipe', 'erp5.bootstrap = slapos.recipe.erp5_bootstrap:Recipe',
'erp5.promise = slapos.recipe.erp5_promise:Recipe', 'erp5.promise = slapos.recipe.erp5_promise:Recipe',
......
# -*- coding: utf-8 -*-
"""
Recipe environment.
See http://pypi.python.org/pypi/collective.recipe.environment/
"""
import os
from slapos.recipe.librecipe import shlex
class Recipe(object):
"""zc.buildout recipe"""
def __init__(self, buildout, name, options):
self.options = options
print 'To replicate the environment in a shell: --------'
for key in options:
print 'export %s=%s' % (key, shlex.quote(options[key]))
print '-------------------------------------------------'
os.environ.update(options)
options.update(os.environ)
def install(self):
"""Installer"""
return tuple()
update = install
...@@ -94,7 +94,7 @@ stop-on-error = True ...@@ -94,7 +94,7 @@ stop-on-error = True
[environment] [environment]
recipe = collective.recipe.environment recipe = slapos.cookbook:environment
ZIMBRA_HOME = ${directories:zimbra_home} ZIMBRA_HOME = ${directories:zimbra_home}
JAVA_HOME = ${jdk:location} JAVA_HOME = ${jdk:location}
ANT_HOME = ${ant:location} ANT_HOME = ${ant:location}
......
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