From 6ef3b4373e758ae734009a09b3463576c96e58d5 Mon Sep 17 00:00:00 2001 From: Peter Dahlberg Date: Wed, 1 Nov 2017 12:58:51 +0100 Subject: [PATCH] Remove vim bundle dir when force installing --- install_files.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/install_files.py b/install_files.py index 7199302..820fe30 100755 --- a/install_files.py +++ b/install_files.py @@ -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",