From 7797f2eede2c79ce0d974df183739995c554abf8 Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Wed, 26 Sep 2018 18:11:42 +0200 Subject: [PATCH] Install updater --- zsh/update.zsh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/zsh/update.zsh b/zsh/update.zsh index b5afaa1..03cc5f9 100644 --- a/zsh/update.zsh +++ b/zsh/update.zsh @@ -62,10 +62,13 @@ update() { cargo install-update --help > /dev/null 2>&1 - if [ $? -eq 0 ]; then - echo "\033[32;1m=== Updating rust packages ===\033[0m" - cargo install-update -ag + if [ $? -ne 0 ]; then + echo "\033[32;1m=== Installing rust packages updater ===\033[0m" + cargo install cargo-update fi + + echo "\033[32;1m=== Updating rust packages ===\033[0m" + cargo install-update -ag fi # Update the dotfiles