Fix customize_user_settings.

This commit is contained in:
Livien Yin
2014-11-10 03:37:59 -08:00
committed by Ivan Malison
parent fbce9d7949
commit b5cae4497b
2 changed files with 15 additions and 18 deletions

View File

@@ -37,11 +37,12 @@ def dotfiles(ctx, flags=''):
@ctask
def powerline(ctx):
ctx.run('pip install --user git+git://github.com/Lokaltog/powerline')
ctx.run('sudo pip install git+git://github.com/Lokaltog/powerline')
@ctask
def install_python_libraries(ctx):
ctx.run('sudo pip install setuptools --upgrade')
ctx.run('sudo pip install -r {0}'.format(
os.path.join(RESOURCES_DIRECTORY, 'requirements.txt')
))
@@ -67,9 +68,9 @@ def change_shell(ctx):
@ctask
def customize_user_settings(ctx):
input_function = input if sys.version_info.major == 3 else raw_input
username = input_function("Enter the user's full name")
email = input_function("Enter the user's Email.")
with os.path.expanduser('~/.gitconfig.custom', 'w') as custom_file:
username = input_function("Enter the user's full name: ")
email = input_function("Enter the user's email address: ")
with open(os.path.expanduser('~/.gitconfig.custom'), 'w') as custom_file:
custom_file.write("""[user]
name = {0}
email = {1}""".format(username, email))