Remove tmux plugin dir while force install
This commit is contained in:
@@ -79,13 +79,15 @@ def install_tmux(pdotfiles, force=False):
|
||||
phome_tmuxrc.symlink_to(pdotfiles_tmuxrc)
|
||||
|
||||
# tpm
|
||||
tpm = phome / Path(".tmux/plugins/tpm")
|
||||
tmux_plugins = phome / Path(".tmux/plugins")
|
||||
tpm = tmux_plugins / Path("tpm")
|
||||
|
||||
if not force and tpm.exists():
|
||||
print("tpm already installed?")
|
||||
if not force and tmux_plugins.exists():
|
||||
print("plugin dir exits, tpm already installed?")
|
||||
else:
|
||||
if force and tpm.exists():
|
||||
shutil.rmtree(tpm.as_posix())
|
||||
if force and tmux_plugins.exists():
|
||||
print("remove tmux plugin dir")
|
||||
shutil.rmtree(tmux_plugins.as_posix())
|
||||
print("Install tpm")
|
||||
check_call(
|
||||
["git", "clone", "https://github.com/tmux-plugins/tpm",
|
||||
|
||||
Reference in New Issue
Block a user