apt-has-upgradable.sh
· 214 B · Bash
Raw
count=$(apt list --upgradable | sed 's/\// /' | awk '{print $1}' | sed 1d | wc -l)
if (($count == 0)); then
MESSAGE="System is up to date"
else
MESSAGE="System is not up to date. Remaining packages: $count"
fi
| 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 |
| 7 |