Last active 1752986982

gaiety's Avatar gaiety revised this gist 1752986982. Go to revision

1 file changed, 6 insertions

apt-has-upgradable.sh(file created)

@@ -0,0 +1,6 @@
1 + count=$(apt list --upgradable | sed 's/\// /' | awk '{print $1}' | sed 1d | wc -l)
2 + if (($count == 0)); then
3 + MESSAGE="System is up to date"
4 + else
5 + MESSAGE="System is not up to date. Remaining packages: $count"
6 + fi
Newer Older