mirror of
https://github.com/leitbogioro/Tools.git
synced 2025-11-08 08:20:39 +08:00
Update 90-footer
This commit is contained in:
parent
09cc529800
commit
fa5e7cc860
1 changed files with 4 additions and 5 deletions
|
|
@ -6,11 +6,10 @@ UpdateLog="/var/log/packagesupdatefile.log"
|
|||
if [ -f "$UpdateLog" ]; then
|
||||
rm -rf $UpdateLog
|
||||
fi
|
||||
apt-get update
|
||||
apt list --upgradable | awk 'END{print NR}' | tee -a "$UpdateLog" > /dev/null 2>&1
|
||||
apt update | tee -a "$UpdateLog" > /dev/null 2>&1
|
||||
UpdateRemind=`cat $UpdateLog | tail -n 1`
|
||||
Result=$(echo $UpdateRemind)
|
||||
if [ "$Result" -ge "1" ]; then
|
||||
printf "$UpdateRemind packages can be upgraded. Run 'apt list --upgradable' to see them.\n"
|
||||
Result=$(echo $UpdateRemind | grep "*packages can be upgraded*")
|
||||
if [ "$Result" != "" ]; then
|
||||
printf "$UpdateRemind"
|
||||
fi
|
||||
rm -rf $UpdateLog
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue