Linux Lite A.I. Services are now live! https://www.linuxliteos.com/shop.html


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LL Software Update Notification..??
#2
For some of the basic packaging operations, apt and yum are basically identical.
These are "similar" operations, but there are some differences in how they act.
These two are similar:
apt-get --simulate upgrade
yum check-update

I guess this one-liner can be used to display a notification if there are updates.
Code:
apt-get --simulate upgrade | grep "The following packages will be upgraded:"; if [ "${PIPESTATUS[1]}" -eq "0" ]; then notify-send -i /usr/share/icons/gnome/32x32/status/software-update-available.png -u normal Updates "There are updates available"; fi

Or in a script
Code:
#!/bin/bash
apt-get --simulate upgrade | grep "The following packages will be upgraded:"
 if [ "${PIPESTATUS[1]}" -eq "0" ]; then
      notify-send -i /usr/share/icons/gnome/32x32/status/software-update-available.png -u normal Updates "There are updates available."
 fi
The icon in the notification area is a tricky part.
Edit: This is not practical because you have to do sudo apt-get update first Smile
Reply


Messages In This Thread
Re: LL Software Update Notification..?? - by misko_2083 - 11-19-2014, 06:47 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)