Remove tmux plugin dir while force install

This commit is contained in:
2017-11-01 12:19:50 +01:00
parent 2ebc02fdc7
commit ff01e8d8be

View File

@@ -79,13 +79,15 @@ def install_tmux(pdotfiles, force=False):
phome_tmuxrc.symlink_to(pdotfiles_tmuxrc) phome_tmuxrc.symlink_to(pdotfiles_tmuxrc)
# tpm # tpm
tpm = phome / Path(".tmux/plugins/tpm") tmux_plugins = phome / Path(".tmux/plugins")
tpm = tmux_plugins / Path("tpm")
if not force and tpm.exists(): if not force and tmux_plugins.exists():
print("tpm already installed?") print("plugin dir exits, tpm already installed?")
else: else:
if force and tpm.exists(): if force and tmux_plugins.exists():
shutil.rmtree(tpm.as_posix()) print("remove tmux plugin dir")
shutil.rmtree(tmux_plugins.as_posix())
print("Install tpm") print("Install tpm")
check_call( check_call(
["git", "clone", "https://github.com/tmux-plugins/tpm", ["git", "clone", "https://github.com/tmux-plugins/tpm",