Commits

Jesper Nøhr  committed d98d512

download url, passing args around

  • Participants
  • Parent commits 335af9a

Comments (0)

Files changed (4)

     name='step',
     version=__version__,
     url='http://bitbucket.org/jespern/step/',
+    download_url='http://bitbucket.org/jespern/step/get/tip.tar.gz',
     license='BSD',
     author='Jesper Noehr',
     author_email='jesper@noehr.org',

File step/__init__.py

 
     print "Reading recipe", recipe, "..",
 
-    rec = Recipe(recipe)
+    sys.argv = args[1:]
+    rec = Recipe(recipe, args[1:])
 
     print "OK\nRunning recipe .."
     

File step/recipe.py

 class Recipe(object):
-    def __init__(self, fn):
+    def __init__(self, fn, args):
         self.fn = fn
         self.retain = {}
-
+        
         execfile(self.fn, globals(), self.retain)
 
         self.steps = self.retain.get('steps')

File step/steps/system.py

 
     def walk(self):
         return os.system(self.command)
+
+class Echo(Step):
+    def __init__(self, string):
+        self.string = string
+
+    def walk(self):
+        print self.string