예제 #1
0
파일: install.py 프로젝트: xyder/dotfiles
def main():
    args = parse_args()

    if not args['root_path']:
        root_path = os.path.dirname(os.path.realpath(__file__))
    else:
        root_path = args['root_path']

    logger, settings = generic_setup(root_path)

    cmd_args = []
    dry_run = False
    if args['dry_run']:
        cmd_args += ['--dry-run']
        dry_run = True
    cmd_args += ['--root-path', root_path]

    gsp = partial(get_script_path, settings)

    call_install_script(gsp('apps'), settings, args=cmd_args, sudo=True)
    pip.main(['install', 'gitpython'])
    call_install_script(gsp('files'), settings, args=cmd_args)
    call_install_script(gsp('repos'), settings, args=cmd_args)

    call_command(explode('~/tmp-fonts/install.sh'))
    shutil.rmtree(explode('~/tmp-fonts'))
    call_command('vim', args=['+PluginInstall', '+qall'])
예제 #2
0
파일: install.py 프로젝트: xyder/dotfiles
def call_install_script(script_file, settings, args=[], sudo=False, die_on_error=True):
    call_command(explode(settings['paths']['installers'], script_file), args=args, sudo=sudo, die_on_error=die_on_error)