Fixed bug in update

This commit is contained in:
Thomas Forgione 2019-01-09 11:02:32 +01:00
parent b775cde688
commit 7f54b3a921
No known key found for this signature in database
GPG Key ID: 203DAEA747F48F41
1 changed files with 39 additions and 38 deletions

View File

@ -59,7 +59,9 @@ update-rust() {
# Update rust if installed
command -v rustup > /dev/null 2>&1
if [ $? -eq 0 ]; then
if [ $? -ne 0 ]; then
return
fi
start_rust_update=`date +%s`
echo "\033[32;1m=== Updating rustup ===\033[0m"
@ -111,7 +113,6 @@ update-rust() {
echo "\033[32;1m=== Updating rust packages ===\033[0m"
cargo install-update -ag
fi
seconds=$((`date +%s` - $start_rust_update ))
formatted=`date -ud "@$seconds" +'%H hours %M minutes %S seconds'`