Cleanup: tp mempool: Remove logically dead code
[lttng-modules.git] / rt-patch-version.sh
CommitLineData
b4c8e4d3
MJ
1#!/bin/sh
2
3# First argument is the path to the kernel headers.
bbba79f5 4KPATH="$1"
b4c8e4d3
MJ
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
bbba79f5 25echo "${RT_PATCH_VERSION}"
This page took 0.026332 seconds and 4 git commands to generate.