view python/install_config.py @ 4:81e89e519980

changed a bunch of stuff, evidently
author k0s <k0scist@gmail.com>
date Sat, 21 Nov 2009 15:43:43 -0500
parents f58e8e81e16b
children 524f9e7fa224
line wrap: on
line source

#!/usr/bin/env python
"""
installs config to a user's home directory
this can be done with
curl http://k0s.org/hg/config/python/install-config.py | python
"""

SRC='http://k0s.org/hg/config'
import os
os.chdir(os.environ['HOME'])

# make the current directory a repository
import subprocess
subprocess.check_call(['hg', 'init'])
subprocess.check_call(['hg', 'pull', SRC])
subprocess.check_call(['hg', 'update', '-C'])