Skip to content

Commit

Permalink
feat: print time taken for all tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
hmerritt committed Oct 28, 2023
1 parent c3d6c2e commit c8d5823
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ if [ "${ARGS[0]}" == "install" ]; then
result "ok"

echo
success "Install complete"
SCRIPT_ELAPSED_TIME=$(($SECONDS - $SCRIPT_START_TIME))
success "Install completed in ${SCRIPT_ELAPSED_TIME}s"
exit
fi

Expand Down Expand Up @@ -112,7 +113,8 @@ if [ "${ARGS[0]}" == "update" ]; then
green "Updated: ${VERSION} --> ${version_latest}"

echo
success "Update complete"
SCRIPT_ELAPSED_TIME=$(($SECONDS - $SCRIPT_START_TIME))
success "Update completed in ${SCRIPT_ELAPSED_TIME}s"
exit
fi

Expand Down Expand Up @@ -147,7 +149,8 @@ tar_args=\"${tar_args}\"
onfail

echo
success "Setup complete"
SCRIPT_ELAPSED_TIME=$(($SECONDS - $SCRIPT_START_TIME))
success "Setup completed in ${SCRIPT_ELAPSED_TIME}s"
exit
fi

Expand Down

0 comments on commit c8d5823

Please sign in to comment.