comparison python/install_config.py @ 51:1aacc851332b

add sensible ~/hg/hgrc file
author Jeff Hammel <k0scist@gmail.com>
date Sun, 28 Mar 2010 16:06:50 -0400
parents abe2508386ac
children 84a37735cd88
comparison
equal deleted inserted replaced
50:abe2508386ac 51:1aacc851332b
15 import subprocess 15 import subprocess
16 16
17 commands = [ ['hg', 'init'], 17 commands = [ ['hg', 'init'],
18 ['hg', 'pull', SRC], 18 ['hg', 'pull', SRC],
19 ['hg', 'update', '-C'], 19 ['hg', 'update', '-C'],
20
21 # get virtual env
20 ['hg', 'clone', 'http://bitbucket.org/ianb/virtualenv'], 22 ['hg', 'clone', 'http://bitbucket.org/ianb/virtualenv'],
21 ['ln' '-s', HOME + '/virtualenv/virtualenv.py', HOME + '/bin/'], 23 ['ln' '-s', HOME + '/virtualenv/virtualenv.py', HOME + '/bin/'],
22 24
23 # site-specific files 25 # site-specific files
24 ['mkdir', '-p', '.subversion'], 26 ['mkdir', '-p', '.subversion'],
32 code = subprocess.call(command) 34 code = subprocess.call(command)
33 if code: 35 if code:
34 sys.exit(code) 36 sys.exit(code)
35 37
36 execute(*commands) 38 execute(*commands)
39 subprocess.call('/bin/echo -e "[paths]\\ndefault = http://k0s.org/hg/config\\ndefault-push = ssh://k0s.org/hg/config" > ~/.hg/hgrc', shell=True)
37 40
38 def install_develop(package): 41 def install_develop(package):
39 src = 'http://k0s.org/hg/%s' % package 42 src = 'http://k0s.org/hg/%s' % package
40 directory = '%s/src/%s' % (package, package) 43 directory = '%s/src/%s' % (package, package)
41 commands = [ ['virtualenv/virtualenv.py', package], 44 commands = [ ['virtualenv/virtualenv.py', package],