mirror of
https://github.com/mag37/dockcheck.git
synced 2026-04-17 09:57:49 +00:00
Update dockcheck.sh
added a check if there's any updates. changed order on listings.
This commit is contained in:
15
dockcheck.sh
15
dockcheck.sh
@@ -42,16 +42,17 @@ printf ". "
|
|||||||
done
|
done
|
||||||
|
|
||||||
### List what containers got updates or not
|
### List what containers got updates or not
|
||||||
if [ -n "$GotUpdates" ] ; then
|
|
||||||
printf "\n\033[31;1mContainers with updates available:\033[0m\n"
|
|
||||||
printf "%s\n" "${GotUpdates[@]}"
|
|
||||||
fi
|
|
||||||
if [ -n "$NoUpdates" ] ; then
|
if [ -n "$NoUpdates" ] ; then
|
||||||
printf "\n\033[32;1mContainers on latest version:\033[0m\n"
|
printf "\n\033[32;1mContainers on latest version:\033[0m\n"
|
||||||
printf "%s\n" "${NoUpdates[@]}"
|
printf "%s\n" "${NoUpdates[@]}"
|
||||||
fi
|
fi
|
||||||
|
if [ -n "$GotUpdates" ] ; then
|
||||||
|
printf "\n\033[31;1mContainers with updates available:\033[0m\n"
|
||||||
|
printf "%s\n" "${GotUpdates[@]}"
|
||||||
|
fi
|
||||||
|
|
||||||
### Optionally get updates
|
### Optionally get updates if there's any
|
||||||
|
if [ -n "$GotUpdates" ] ; then
|
||||||
printf "\n\033[36;1mDo you want to update? y/[n]\033[0m\n"
|
printf "\n\033[36;1mDo you want to update? y/[n]\033[0m\n"
|
||||||
read UpdYes
|
read UpdYes
|
||||||
if [ "$UpdYes" != "${UpdYes#[Yy]}" ] ; then
|
if [ "$UpdYes" != "${UpdYes#[Yy]}" ] ; then
|
||||||
@@ -66,3 +67,7 @@ if [ "$UpdYes" != "${UpdYes#[Yy]}" ] ; then
|
|||||||
else
|
else
|
||||||
printf "\nNo updates installed, exiting.\n"
|
printf "\nNo updates installed, exiting.\n"
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
printf "\nNo updates available, exiting.\n"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user