Updated notify
This commit is contained in:
parent
ff0976bee0
commit
d23d9e2e09
1 changed files with 4 additions and 3 deletions
|
@ -1,7 +1,8 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
# Get icon
|
# Get icon
|
||||||
ICON=`pwd`/tux.png
|
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
|
||||||
|
ICON=${SCRIPTPATH}/tux.png
|
||||||
# Get installed kernel version
|
# Get installed kernel version
|
||||||
CURRENT=`uname -r|cut -d'-' -f 1`
|
CURRENT=`uname -r|cut -d'-' -f 1`
|
||||||
# Get last available stable version
|
# Get last available stable version
|
||||||
|
@ -9,6 +10,6 @@ INFO=`curl -Ls https://www.kernel.org/ | perl -lne 'BEGIN{$/=""} print "$1 $2" i
|
||||||
/latest_link.*?<a.*?href=\"(.*?)\".*?>(.*?)</s'`
|
/latest_link.*?<a.*?href=\"(.*?)\".*?>(.*?)</s'`
|
||||||
LASTVERSION=`echo ${INFO} | cut -d' ' -f 2`
|
LASTVERSION=`echo ${INFO} | cut -d' ' -f 2`
|
||||||
|
|
||||||
if [ ${CURRENT} != ${LASTVERSION} ] ; then
|
if [ "${CURRENT}" != "${LASTVERSION}" ] ; then
|
||||||
notify-send -i ${ICON} "Kernel update" "Need version available (${LASTVERSION})"
|
notify-send -i ${ICON} "Kernel update" "New version available (${LASTVERSION})"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue