Fix: network instrumentation protocol enum
[lttng-modules.git] / rt-patch-version.sh
CommitLineData
b4c8e4d3
MJ
1#!/bin/sh
2
3# First argument is the path to the kernel headers.
4KPATH=$1
5
6VERSIONFILE=""
7
8if [ -f "${KPATH}/localversion-rt" ]; then
9 VERSIONFILE="${KPATH}/localversion-rt"
10
11elif [ -f "${KPATH}/source/localversion-rt" ]; then
12 VERSIONFILE="${KPATH}/source/localversion-rt"
13else
14 echo 0
15 exit 0
16fi
17
18RT_PATCH_VERSION=$(sed -rn 's/^-rt([0-9]+)$/\1/p' "${VERSIONFILE}")
19
20if [ "x${RT_PATCH_VERSION}" = "x" ]; then
21 echo 0
22 exit 0
23fi
24
25echo ${RT_PATCH_VERSION}
This page took 0.024905 seconds and 4 git commands to generate.