Skip to content

Instantly share code, notes, and snippets.

@krisanalfa
Created May 13, 2013 06:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krisanalfa/5566593 to your computer and use it in GitHub Desktop.
Save krisanalfa/5566593 to your computer and use it in GitHub Desktop.
Find out if you are using the latest stable kernel from kernel.org or not
#!/usr/bin/env bash
latest=$(curl https://www.kernel.org/ -s | sed -n "/<td id=\"latest_link\">/,/<\/td>/p" | sed -n -e 's/.*<a.*>\(.*\)<\/a>.*/\1/p');
yours=$(uname -r | sed 's/-.*$//g');
if [[ $latest == "" ]]; then
echo "Please connect to internet"
else
if [[ $latest == $yours ]]; then
echo "You are updated!"
else
echo "You are NOT updated!"
fi
fi
@izoel
Copy link

izoel commented May 13, 2013

itu kode apaan kang ?

@krisanalfa
Copy link
Author

izoel: cuma nyari tau, kernel kita udah pakek versi terakhir yang udah di-release sama kernel.org apa belum. nantinya mau dibuat script lengkap buat compiling kernel otomatis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment