changeset 1:f58e8e81e16b

adding program to install config
author k0s <k0scist@gmail.com>
date Thu, 15 Oct 2009 12:40:49 -0400
parents f3ab51c79813
children 3530d50c97ff
files python/install_config.py
diffstat 1 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/python/install_config.py	Thu Oct 15 12:40:49 2009 -0400
@@ -0,0 +1,18 @@
+#!/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'])
+
+