summaryrefslogtreecommitdiffstats
path: root/scripts/kernel-version.sh
blob: e2ec93a5ae88b83256bb588b6f7628a4ffc6e1ac (plain)
1
2
3
4
5
6
7
8
VER=$(grep patch sources | head -n1 | awk '{ print $2 }' | sed s/patch-// | sed s/-git.*// | sed s/.xz// | tr -d "()")

if [ -z "$VER" ] ;
then
    VER=$(grep linux sources | head -1 | awk '{ print $2 }' | sed s/linux-// | sed s/.tar.xz// | tr -d "()")
fi