mirror of
https://github.com/mag37/dockcheck.git
synced 2026-04-18 05:39:06 +02:00
Rewrote prune prompt logic, wont prompt if none-interactive flags are used
This commit is contained in:
parent
29dffbb9b3
commit
7d825f36c9
1 changed files with 3 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
VERSION="v0.4.7"
|
VERSION="v0.4.8"
|
||||||
### ChangeNotes: Notification template changes for: gotify(new), DSM(improved), SMTP(deprecation alternative).
|
### ChangeNotes: Rewrote prune to not prompt (default no) if -a|-y or -n flags are used. -p will still autoprune.
|
||||||
Github="https://github.com/mag37/dockcheck"
|
Github="https://github.com/mag37/dockcheck"
|
||||||
RawUrl="https://raw.githubusercontent.com/mag37/dockcheck/main/dockcheck.sh"
|
RawUrl="https://raw.githubusercontent.com/mag37/dockcheck/main/dockcheck.sh"
|
||||||
|
|
||||||
|
|
@ -333,7 +333,7 @@ if [ -n "$GotUpdates" ] ; then
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
printf "\n%bAll done!%b\n" "$c_green" "$c_reset"
|
printf "\n%bAll done!%b\n" "$c_green" "$c_reset"
|
||||||
[[ -z "$AutoPrune" ]] && read -r -p "Would you like to prune dangling images? y/[n]: " AutoPrune
|
if [[ -z "$AutoPrune" ]] && [[ -z "$AutoUp" ]]; then read -r -p "Would you like to prune dangling images? y/[n]: " AutoPrune ; fi
|
||||||
[[ "$AutoPrune" =~ [yY] ]] && docker image prune -f
|
[[ "$AutoPrune" =~ [yY] ]] && docker image prune -f
|
||||||
else
|
else
|
||||||
printf "\nNo updates installed, exiting.\n"
|
printf "\nNo updates installed, exiting.\n"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue