Skip to content

Commit

Permalink
Percent of work done by finding changes
Browse files Browse the repository at this point in the history
  • Loading branch information
matteocorti committed Mar 30, 2023
1 parent b71bbb6 commit fbd8486
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2023-03-30 Matteo Corti <[email protected]>

* tmstatus.sh (status): Percent of work done by finding changes

2023-03-24 Matteo Corti <[email protected]>

* tmstatus.sh (status): Warn if --today is speficied and the time machine is offline
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
```--today``` option
* Displays the progress by the phase 'finding changes'
* Displays the number of backups today
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.10.0
1.11.0
9 changes: 8 additions & 1 deletion tmstatus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#

# shellcheck disable=SC2034
VERSION=1.10.0
VERSION=1.11.0

export LC_ALL=C

Expand Down Expand Up @@ -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
Expand All @@ -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%'
Expand Down

0 comments on commit fbd8486

Please sign in to comment.