Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 41 lines (31 sloc) 1.155 kB
#!/usr/bin/env python
#
# Installs vim plugins and connects all dotfiles to their version-controlled
# counterparts with symlinks.
#
from glob import glob
from os.path import join, abspath, dirname, basename, expanduser, exists
from os import system, chdir, rename
repo = abspath(dirname(__file__))
linkable = [abspath(filename) for filename in glob(join(repo, '*'))
if basename(filename) not in ('wireup.py', 'gitignore')]
print linkable
chdir(repo)
# Link dotfiles in ~ to filenames in this folder
for filename in linkable:
link = expanduser(join('~', '.' + basename(filename)))
print 'creating link from %s to %s' % (link, filename)
try:
proceed = raw_input('Press any key to confirm, or type "n" to skip.\n')
if proceed in ('n', 'N'):
print 'skipping'
continue
except:
break
# Rename original if exists
if exists(link):
rename(link, '%s.old' % link)
system('ln -sf %(filename)s %(link)s' % locals())
# Install Vundle and plugins
system('git submodule update --init')
system('vim -c "echo \'Installing bundles...\'" -c "BundleInstall" -c "quit"')
Jump to Line
Something went wrong with that request. Please try again.