summaryrefslogtreecommitdiffstats
path: root/scripts/kernel-version.sh
diff options
context:
space:
mode:
authorJustin M. Forbes <jforbes@redhat.com>2017-02-20 13:20:23 -0600
committerJustin M. Forbes <jforbes@redhat.com>2017-02-20 13:20:23 -0600
commita98ed5ce60a3a27dd83f47a33d8993eaaef3685e (patch)
tree2390fe67f35cf364436421355cf15e7fab72e294 /scripts/kernel-version.sh
parent7a011b1bac9aea1fdb059ef767f1445c7062b79d (diff)
downloadkernel-a98ed5ce60a3a27dd83f47a33d8993eaaef3685e.tar.gz
kernel-a98ed5ce60a3a27dd83f47a33d8993eaaef3685e.tar.xz
kernel-a98ed5ce60a3a27dd83f47a33d8993eaaef3685e.zip
Linux 4.10 rebase for stabilization
Diffstat (limited to 'scripts/kernel-version.sh')
-rw-r--r--scripts/kernel-version.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/kernel-version.sh b/scripts/kernel-version.sh
new file mode 100644
index 000000000..36e00194b
--- /dev/null
+++ b/scripts/kernel-version.sh
@@ -0,0 +1,8 @@
+VER=$(grep patch sources | head -n1 | awk '{ print $2 }' | sed s/patch-// | sed s/-git.*// | sed s/.xz//)
+
+if [ -z "$VER" ] ;
+then
+ VER=$(grep linux sources | head -1 | awk '{ print $2 }' | sed s/linux-// | sed s/.tar.xz//)
+fi
+
+