comparison python/install_config.py @ 409:dc64beded724

pt deux and such
author Jeff Hammel <jhammel@mozilla.com>
date Sun, 04 Aug 2013 10:57:10 -0700
parents 705dc5cfd68d
children ffa08f0de165
comparison
equal deleted inserted replaced
408:705dc5cfd68d 409:dc64beded724
34 def __call__(self): 34 def __call__(self):
35 execute(*self.commands) 35 execute(*self.commands)
36 36
37 class InitializeRepository(Step): 37 class InitializeRepository(Step):
38 """make the home directory a repository""" 38 """make the home directory a repository"""
39 commands = [
40 ['hg', 'init'],
41 ['hg', 'pull', SRC],
42 ['hg', 'update', '-C'],
43 ]
39 44
40 commands = [ 45 commands = [
41 ['hg', 'init'], 46 ['hg', 'init'],
42 ['hg', 'pull', SRC], 47 ['hg', 'pull', SRC],
43 ['hg', 'update', '-C'], 48 ['hg', 'update', '-C'],
59 f = file('.hg/hgrc', 'w') 64 f = file('.hg/hgrc', 'w')
60 f.write(hgrc) 65 f.write(hgrc)
61 f.close() 66 f.close()
62 67
63 def install_develop(package): 68 def install_develop(package):
69 """install k0s.ware for development"""
70
64 src = 'http://k0s.org/hg/%s' % package 71 src = 'http://k0s.org/hg/%s' % package
65 directory = '%s/src/%s' % (package, package) 72 directory = '%s/src/%s' % (package, package)
66 commands = [ ['virtualenv/virtualenv.py', package], 73 commands = [ ['virtualenv/virtualenv.py', package],
67 ['mkdir', '-p', directory ], 74 ['mkdir', '-p', directory ],
68 ['hg', 'clone', src, directory] ] 75 ['hg', 'clone', src, directory] ]
105 112
106 def main(args=sys.argv[1:]): 113 def main(args=sys.argv[1:]):
107 usage = '%prog [options]' 114 usage = '%prog [options]'
108 parser = optparse.OptionParser(usage=usage, description=__doc__) 115 parser = optparse.OptionParser(usage=usage, description=__doc__)
109 options, args = parser.parse_args() 116 options, args = parser.parse_args()
117 return
110 118
111 steps = [InitializeRepository] 119 steps = [InitializeRepository]
112 120 for step in steps:
121
122
113 if __name__ == '__main__': 123 if __name__ == '__main__':
114 main() 124 main()