diff --git a/ChangeLog b/ChangeLog index dc0c42a..43f9bd5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2023-03-30 Matteo Corti + + * tmstatus.sh (status): Percent of work done by finding changes + 2023-03-24 Matteo Corti * tmstatus.sh (status): Warn if --today is speficied and the time machine is offline diff --git a/NEWS.md b/NEWS.md index afea183..bd62d83 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,5 @@ +* 2023-03-30, Version 1.11.0 + * Displays the progress by the phase 'finding changes' * Displays the number of backups today * 2023-03-17, Version 1.10.0 * ```--today``` option diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 867f172..a1f83cf 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1 +1,2 @@ -```--today``` option + * Displays the progress by the phase 'finding changes' + * Displays the number of backups today diff --git a/VERSION b/VERSION index 81c871d..1cac385 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.10.0 +1.11.0 diff --git a/tmstatus.sh b/tmstatus.sh index 3292e95..43701d3 100755 --- a/tmstatus.sh +++ b/tmstatus.sh @@ -12,7 +12,7 @@ # # shellcheck disable=SC2034 -VERSION=1.10.0 +VERSION=1.11.0 export LC_ALL=C @@ -356,6 +356,11 @@ if echo "${status}" | grep -q 'BackupPhase'; then fi + elif echo "${status}" | grep -q FindingChanges ; then + + percent=$( echo "${status}" | grep FractionDone | sed -e 's/.*[.]\([0-9][0-9]\).*/\1%/' ) + printf 'Percent:\t%s\n' "${percent}" + fi else @@ -364,6 +369,8 @@ else fi + + if echo "${status}" | grep '_raw_Percent' | grep -q -v '[0-9]e-'; then if echo "${status}" | grep -q '_raw_Percent" = 1;'; then percent='100%'