added some function to bashrc. fixed issue 2.

This commit is contained in:
utahta
2010-11-20 07:38:22 +09:00
parent 0bc17f56db
commit 0605c27c57
12 changed files with 107 additions and 33 deletions
+3 -4
View File
@@ -6,8 +6,7 @@ from pythonbrew.define import PATH_DISTS, VERSION, ROOT,\
from pythonbrew.log import logger
from pythonbrew.downloader import Downloader, get_pythonbrew_update_url,\
get_response_from_url, get_stable_version
from pythonbrew.util import rm_r, unpack_downloadfile, Link, is_gzip
from pythonbrew.installer import PythonbrewInstaller
from pythonbrew.util import rm_r, unpack_downloadfile, Link, is_gzip, Subprocess
class UpdateCommand(Command):
name = "update"
@@ -51,9 +50,9 @@ class UpdateCommand(Command):
sys.exit(1)
try:
installer_path = "%s/pythonbrew" % (extract_dir)
logger.info("Installing %s into %s" % (extract_dir, ROOT))
PythonbrewInstaller().install(installer_path)
s = Subprocess()
s.check_call('%s %s/pythonbrew_install.py --upgrade' % (sys.executable, extract_dir))
except:
logger.error("Failed to update pythonbrew.")
raise