Commits

Albert Hopkins committed 1554dff

hemp.py: Added --run parameter to unpack subcommand to optionally run "fab go"

Comments (0)

Files changed (1)

 
 import settings
 
-__version__ = '0.4.4.1'
+__version__ = '0.4.5'
 __revision__ = '$Revision$'
 
 DIRS = ('images',)
     call(('tar', 'zx', '-C', path), stdin=cloud_file)
     cloud_file.close()
 
+    if args.run:
+        os.chdir(path)
+        call(('fab', 'go'))
+
 
 def parse_args():
     """Parse and return command-line arguments"""
         type=str,
         default='.'
     )
+    parser_unpack.add_argument('--run',
+        help='Start the cloud after unpacking a la "fab go"',
+        action='store_true',
+    )
     parser_unpack.add_argument('filename',
         help='filename of the cloud to unpack',
         type=str,