Mercurial > hg > config
annotate python/install_config.py @ 3:a7188391b4ce
autojoin socialplanning
author | k0s <k0scist@gmail.com> |
---|---|
date | Wed, 28 Oct 2009 12:49:24 -0400 |
parents | f58e8e81e16b |
children | 524f9e7fa224 |
rev | line source |
---|---|
1 | 1 #!/usr/bin/env python |
2 """ | |
3 installs config to a user's home directory | |
4 this can be done with | |
5 curl http://k0s.org/hg/config/python/install-config.py | python | |
6 """ | |
7 | |
8 SRC='http://k0s.org/hg/config' | |
9 import os | |
10 os.chdir(os.environ['HOME']) | |
11 | |
12 # make the current directory a repository | |
13 import subprocess | |
14 subprocess.check_call(['hg', 'init']) | |
15 subprocess.check_call(['hg', 'pull', SRC]) | |
16 subprocess.check_call(['hg', 'update', '-C']) | |
17 | |
18 |