13 lines
351 B
Plaintext
13 lines
351 B
Plaintext
|
#!/bin/sh
|
||
|
printf "\n"
|
||
|
number=`apt list --upgradable 2> /dev/null | grep 'upgradable' | wc -l`
|
||
|
printf "Available updates : %s\n" $number
|
||
|
|
||
|
if [ $number -gt 0 ]; then
|
||
|
printf "\033[1;31mSystem needs %s updates\033[0m\n" $number
|
||
|
apt list --upgradable 2> /dev/null | grep 'upgradable'
|
||
|
else
|
||
|
printf "\033[1;32mSystem is uptodate\033[0m\n"
|
||
|
fi
|
||
|
echo
|