Created
May 13, 2013 06:58
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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: 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
itu kode apaan kang ?