Added auto check new kernel

This commit is contained in:
dbroqua 2019-06-25 10:36:41 +02:00
parent f8ebc9b8bb
commit aa67e02c67
2 changed files with 15 additions and 0 deletions

15
notify.sh Executable file
View File

@ -0,0 +1,15 @@
#! /bin/bash
# Get icon
ICON=`pwd`/tux.png
# Get installed kernel version
CURRENT=`uname -r|cut -d'-' -f 1`
# Get last available stable version
INFO=`curl -Ls https://www.kernel.org/ | perl -lne 'BEGIN{$/=""} print "$1 $2" if \
/latest_link.*?<a.*?href=\"(.*?)\".*?>(.*?)</s'`
LASTVERSION=`echo ${INFO} | cut -d' ' -f 2`
if [ ${CURRENT} != ${LASTVERSION} ] ; then
PAT
notify-send -i ${ICON} "Kernel update" "Need version available (${LASTVERSION})"
fi

BIN
tux.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB