Remove vim bundle dir when force installing
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user