Fixed bug in update
This commit is contained in:
parent
b775cde688
commit
7f54b3a921
|
@ -59,7 +59,9 @@ update-rust() {
|
||||||
|
|
||||||
# Update rust if installed
|
# Update rust if installed
|
||||||
command -v rustup > /dev/null 2>&1
|
command -v rustup > /dev/null 2>&1
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
start_rust_update=`date +%s`
|
start_rust_update=`date +%s`
|
||||||
echo "\033[32;1m=== Updating rustup ===\033[0m"
|
echo "\033[32;1m=== Updating rustup ===\033[0m"
|
||||||
|
@ -111,7 +113,6 @@ update-rust() {
|
||||||
|
|
||||||
echo "\033[32;1m=== Updating rust packages ===\033[0m"
|
echo "\033[32;1m=== Updating rust packages ===\033[0m"
|
||||||
cargo install-update -ag
|
cargo install-update -ag
|
||||||
fi
|
|
||||||
|
|
||||||
seconds=$((`date +%s` - $start_rust_update ))
|
seconds=$((`date +%s` - $start_rust_update ))
|
||||||
formatted=`date -ud "@$seconds" +'%H hours %M minutes %S seconds'`
|
formatted=`date -ud "@$seconds" +'%H hours %M minutes %S seconds'`
|
||||||
|
|
Loading…
Reference in New Issue