Fix: scsi: sd: Atomic write support added in 6.11-rc1
[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)
61baff6e 3# SPDX-FileCopyrightText: 2016-2018 EfficiOS Inc.
b4c8e4d3
MJ
4
5# First argument is the path to the kernel headers.
8a71de6c 6KPATH="$1"
b4c8e4d3
MJ
7
8VERSIONFILE=""
9
10if [ -f "${KPATH}/localversion-rt" ]; then
11 VERSIONFILE="${KPATH}/localversion-rt"
12
13elif [ -f "${KPATH}/source/localversion-rt" ]; then
14 VERSIONFILE="${KPATH}/source/localversion-rt"
15else
16 echo 0
17 exit 0
18fi
19
20RT_PATCH_VERSION=$(sed -rn 's/^-rt([0-9]+)$/\1/p' "${VERSIONFILE}")
21
22if [ "x${RT_PATCH_VERSION}" = "x" ]; then
23 echo 0
24 exit 0
25fi
26
8a71de6c 27echo "${RT_PATCH_VERSION}"
This page took 0.044472 seconds and 4 git commands to generate.