Plugin installation does not perform update

Plugin installation just installs new plugins.
Already installed plugins aren't updated.
This commit is contained in:
Bruno Sutic 2014-08-05 18:11:37 +02:00
parent 9a27de4193
commit d1aed98621
2 changed files with 5 additions and 6 deletions

View File

@ -9,6 +9,8 @@
- remove README 'about' section
- move key binding to the main file. Delete `key_binding.sh`.
- rename `display_message` -> `echo_message`
- installing plugins installs just new plugins. Already installed plugins aren't
updated.
### v0.0.2, 2014-07-17
- run all *.tmux plugin files as executables

View File

@ -52,14 +52,11 @@ pull_changes() {
sync_plugin() {
local plugin=$1
if plugin_already_cloned "$plugin"; then
# plugin is already cloned - update it
echo_message "Updating $plugin"
pull_changes "$plugin" &&
echo_message " $plugin update success" ||
echo_message " $plugin update fail"
# plugin is already installed
echo_message "Already installed $plugin"
else
# plugin wasn't cloned so far - clone it
echo_message "Downloading $plugin"
echo_message "Installing $plugin"
clone_plugin "$plugin" &&
echo_message " $plugin download success" ||
echo_message " $plugin download fail"