Compare commits

...

3 Commits

Author SHA1 Message Date
mag37
ef0198871c colored backup removal message 2025-12-10 18:29:29 +01:00
mag37
6b3c2680d4 typo fixes 2025-12-10 18:22:07 +01:00
mag37
56d0229d6d added dynamic phrasing to backup removal 2025-12-10 18:15:44 +01:00
2 changed files with 6 additions and 5 deletions

View File

@@ -13,9 +13,9 @@
</p> </p>
<h2 align="center">CLI tool to automate docker image updates or notifying when updates are available.</h2> <h2 align="center">CLI tool to automate docker image updates or notifying when updates are available.</h2>
<h3 align="center">selective updates, exclude containers, custom labels, notification plugins, prune when done etc.</h3> <h3 align="center">selective updates, include/exclude containers, image backups, custom labels, notification plugins, prune when done etc.</h3>
<h4 align="center">:whale: Docker Hub pull limit :chart_with_downwards_trend: not an issue for checks but for actual pulls - <a href="#whale-docker-hub-pull-limit-chart_with_downwards_trend-not-an-issue-for-checks-but-for-actual-pulls">read more</a></h4> <h4 align="center">:whale: Docker Hub pull limit :chart_with_downwards_trend: not an issue for checks only for actual pulls - <a href="#whale-docker-hub-pull-limit-chart_with_downwards_trend-not-an-issue-for-checks-but-for-actual-pulls">read more</a></h4>
<h5 align="center">For Podman - see the fork <a href="https://github.com/sudo-kraken/podcheck">sudo-kraken/podcheck</a>!</h4> <h5 align="center">For Podman - see the fork <a href="https://github.com/sudo-kraken/podcheck">sudo-kraken/podcheck</a>!</h4>
@@ -26,7 +26,7 @@ ___
- Added new option **BackupForDays**; `-b N` and `-B`: - Added new option **BackupForDays**; `-b N` and `-B`:
- Backup an image before pulling a new version for easy rollback in case of breakage. - Backup an image before pulling a new version for easy rollback in case of breakage.
- Removes backed up images older than *N* days. - Removes backed up images older than *N* days.
- List currently backed up images with `-K`. - List currently backed up images with `-B`.
- **v0.7.4**: - **v0.7.4**:
- Added new option `-R`: - Added new option `-R`:
- Will skip container recreation after pulling images. - Will skip container recreation after pulling images.

View File

@@ -271,7 +271,7 @@ remove_backups() {
backup_date=${backup_tag%%_*} backup_date=${backup_tag%%_*}
# UNTAGGING HERE # UNTAGGING HERE
if datecheck "$backup_date" "$BackupForDays"; then if datecheck "$backup_date" "$BackupForDays"; then
[[ "$CleanupCount" == 0 ]] && echo "Removing backed up images older then $BackupForDays days." [[ "$CleanupCount" == 0 ]] && printf "\n%bRemoving backed up images older then %s days.%b\n" "$c_blue" "$BackupForDays" "$c_reset"
docker rmi "${repo_name}:${backup_tag}" && ((CleanupCount+=1)) docker rmi "${repo_name}:${backup_tag}" && ((CleanupCount+=1))
fi fi
done done
@@ -279,7 +279,8 @@ remove_backups() {
if [[ "$CleanupCount" == 0 ]]; then if [[ "$CleanupCount" == 0 ]]; then
printf "\nNo backup images to remove.\n" printf "\nNo backup images to remove.\n"
else else
printf "\n%b%s%b backup removed.%b\n" "$c_green" "$CleanupCount" "$c_teal" "$c_reset" [[ "$CleanupCount" -gt 1 ]] && b_phrase="backups" || b_phrase="backup"
printf "\n%b%s%b %s removed.%b\n" "$c_green" "$CleanupCount" "$c_teal" "$b_phrase" "$c_reset"
fi fi
} }