Remove vim bundle dir when force installing

This commit is contained in:
2017-11-01 12:58:51 +01:00
parent 7177f14d27
commit 6ef3b4373e

View File

@@ -45,13 +45,15 @@ def install_vim(pdotfiles, force=False):
phome_vimrc.symlink_to(pdotfiles_vimrc)
# vundle
pvundle = phome / Path(".vim/bundle/Vundle.vim")
bundle_dir = phome / Path(".vim/bundle")
pvundle = bundle_dir / Path("Vundle.vim")
if not force and pvundle.exists():
if not force and bundle_dir.exists():
print("Vundle already installed?")
else:
if force and pvundle.exists():
shutil.rmtree(pvundle.as_posix())
if force and bundle_dir.exists():
print("Removing bundle dir")
shutil.rmtree(bundle_dir.as_posix())
print("Install Vundle")
check_call(
["git", "clone", "https://github.com/VundleVim/Vundle.vim.git",