wrapper: remove perf wrapper
[lttng-modules.git] / scripts / rt-patch-version.sh
CommitLineData
b4c8e4d3 1#!/bin/sh
b7cdc182 2# SPDX-License-Identifier: (GPL-2.0-only OR LGPL-2.1-only)
b4c8e4d3
MJ
3
4# First argument is the path to the kernel headers.
8a71de6c 5KPATH="$1"
b4c8e4d3
MJ
6
7VERSIONFILE=""
8
9if [ -f "${KPATH}/localversion-rt" ]; then
10 VERSIONFILE="${KPATH}/localversion-rt"
11
12elif [ -f "${KPATH}/source/localversion-rt" ]; then
13 VERSIONFILE="${KPATH}/source/localversion-rt"
14else
15 echo 0
16 exit 0
17fi
18
19RT_PATCH_VERSION=$(sed -rn 's/^-rt([0-9]+)$/\1/p' "${VERSIONFILE}")
20
21if [ "x${RT_PATCH_VERSION}" = "x" ]; then
22 echo 0
23 exit 0
24fi
25
8a71de6c 26echo "${RT_PATCH_VERSION}"
This page took 0.047897 seconds and 4 git commands to generate.